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

A few fixes/improvements for the DataSource module #6219

Merged
merged 4 commits into from
Oct 15, 2024
Merged

Conversation

artf
Copy link
Member

@artf artf commented Oct 15, 2024

No description provided.

Comment on lines +181 to +184
postLoad() {
const { em, all } = this;
em.listenTo(all, collectionEvents, (m, c, o) => em.changesUp(o || c));
}
Copy link
Member Author

Choose a reason for hiding this comment

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

trigger editor update on data source collection changes

@@ -74,6 +74,7 @@ export default class DataSource extends Model<DataSourceProps> {
}

this.listenTo(this.records, 'add', this.onAdd);
this.listenTo(this.records, collectionEvents, this.handleChanges);
Copy link
Member Author

Choose a reason for hiding this comment

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

Trigger editor updates on data record collection changes.

I think some data sources (eg. with data loaded asynchronously) could be updated without triggering any update.

@@ -151,22 +151,11 @@ export default class StyleableModel<T extends ObjectHash = any> extends Model<T>
model: this,
em: this.em!,
dataVariable: dataVar,
updateValueFromDataVariable: (newValue: string) => this.updateStyleProp(styleProp, newValue),
updateValueFromDataVariable: () => this.updateView(),
Copy link
Member Author

Choose a reason for hiding this comment

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

no need to update the model as it's already resolved inside getStyle

@artf artf merged commit 1636b59 into dev Oct 15, 2024
3 checks passed
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.

1 participant