Skip to content
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

Merged
merged 4 commits into from
Jun 28, 2021
Merged

Filter enhancement #357

merged 4 commits into from
Jun 28, 2021

Conversation

PianoRollRepresentation
Copy link
Collaborator

Solves #345.

Copy link
Collaborator

@joluj joluj left a 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

@inject(LoadingStore)
private readonly loadingStore!: LoadingStore;

private initializedInternal = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private initializedInternal = false;
private initialized = false;

Comment on lines 26 to 32
/**
* Used to identify whether this store has already been filled with data from
* the {@link schemaService}.
*/
public get initialized(): boolean {
return this.initializedInternal;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* Used to identify whether this store has already been filled with data from
* the {@link schemaService}.
*/
public get initialized(): boolean {
return this.initializedInternal;
}

this.initializedInternal = true;
this.executeQuery().subscribe({
next: (res) => {
if (res) {
Copy link
Collaborator

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

Comment on lines 38 to 42
/**
* Updates the current state of this store with data fetched by
* the {@link schemaService}.
*/
public update(): void {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* 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) {
Copy link
Collaborator

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

@PianoRollRepresentation PianoRollRepresentation merged commit 1e4ead1 into main Jun 28, 2021
@PianoRollRepresentation PianoRollRepresentation deleted the filter-enhancement branch June 29, 2021 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants