-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
postLoad() { | ||
const { em, all } = this; | ||
em.listenTo(all, collectionEvents, (m, c, o) => em.changesUp(o || c)); | ||
} |
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.
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); |
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.
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(), |
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.
no need to update the model as it's already resolved inside getStyle
No description provided.