fix(plugin-sql-editor): CB-2094 initial state

This commit is contained in:
Wroud
2022-06-22 13:36:57 +03:00
parent 8c17b35ac0
commit 714d015780
3 changed files with 4 additions and 1 deletions
@@ -58,13 +58,14 @@ export class ResourceSqlDataSource extends BaseSqlDataSource {
this.loaded = false;
this.debouncedWrite = debounce(this.debouncedWrite.bind(this), VALUE_SYNC_DELAY);
makeObservable<this, '_script' | 'lastAction' | 'loading'>(this, {
makeObservable<this, '_script' | 'lastAction' | 'loading' | 'loaded'>(this, {
script: computed,
executionContext: computed,
nodeInfo: computed,
_script: observable,
lastAction: observable,
loading: observable,
loaded: observable,
setScript: action,
setNodeInfo: action,
});
@@ -29,6 +29,7 @@ export class LocalStorageSqlDataSource extends BaseSqlDataSource {
constructor(state: ILocalStorageSqlDataSourceState) {
super();
this.state = state;
this.outdated = false;
makeObservable(this, {
script: computed,
@@ -30,6 +30,7 @@ export class MemorySqlDataSource extends BaseSqlDataSource {
super();
this._script = script;
this._executionContext = executionContext;
this.outdated = false;
makeObservable<this, '_script' | '_executionContext'>(this, {
_script: observable,