-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter enhancement #357
Filter enhancement #357
Conversation
…and rearrange initialization of FilterState to FilterStateStore.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stores must not be initialized from the outside. Use our ensureInit
functionality
frontend/src/stores/SchemaStore.ts
Outdated
@inject(LoadingStore) | ||
private readonly loadingStore!: LoadingStore; | ||
|
||
private initializedInternal = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private initializedInternal = false; | |
private initialized = false; |
frontend/src/stores/SchemaStore.ts
Outdated
/** | ||
* Used to identify whether this store has already been filled with data from | ||
* the {@link schemaService}. | ||
*/ | ||
public get initialized(): boolean { | ||
return this.initializedInternal; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* Used to identify whether this store has already been filled with data from | |
* the {@link schemaService}. | |
*/ | |
public get initialized(): boolean { | |
return this.initializedInternal; | |
} |
frontend/src/stores/SchemaStore.ts
Outdated
this.initializedInternal = true; | ||
this.executeQuery().subscribe({ | ||
next: (res) => { | ||
if (res) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
res cannot be null right? If is not required
frontend/src/stores/SchemaStore.ts
Outdated
/** | ||
* Updates the current state of this store with data fetched by | ||
* the {@link schemaService}. | ||
*/ | ||
public update(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* Updates the current state of this store with data fetched by | |
* the {@link schemaService}. | |
*/ | |
public update(): void { | |
/** | |
* @override | |
*/ | |
protected ensureInit() { |
}); | ||
// only update the schemaStore on the very first time, the Filter is rendered. | ||
// So no update happens when switching between tabs. | ||
if (!schemaStore.initialized) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such information should not be published. Thus the SchemaStore should be changed a bit (use ensureInit functionality); See change requests
Solves #345.