Add Components dynamic values ( props - attributes )#6351
Conversation
…nents-dynamic-values
…nents-dynamic-values
packages/core/test/specs/data_sources/dynamic_values/attributes.ts
Outdated
Show resolved
Hide resolved
packages/core/test/specs/data_sources/model/conditional_variables/ConditionalTraits.ts
Outdated
Show resolved
Hide resolved
packages/core/src/dom_components/model/ComponentDynamicValueListener.ts
Outdated
Show resolved
Hide resolved
.../test/specs/data_sources/model/conditional_variables/__snapshots__/ConditionalTraits.ts.snap
Outdated
Show resolved
Hide resolved
packages/core/src/dom_components/model/ComponentDynamicValueListener.ts
Outdated
Show resolved
Hide resolved
packages/core/test/specs/data_sources/dynamic_values/attributes.ts
Outdated
Show resolved
Hide resolved
|
|
||
| private createPropertyUpdater() { | ||
| return (key: string, value: any) => { | ||
| this.component.set(key, value, { skipWatcherUpdates: false }); |
There was a problem hiding this comment.
I think when we update the component from data sources changes, we don't want this change to be counted as a dirty change and skip it from the undoManager (avoidStore option should already handle both cases).
Probably DataSource itself could define if it needs to trigger the dirty change and if the change is undoable.
For example, a data source with external records (eg. REST API) could retrigger the fetch of all records on a specific interval. The editor would update components with new data but I'd not expect changes on the project data itself.
In case of static data source records (records stored in the project JSON), their update will trigger the dirty change and could be defined as an undoable action.
Uh oh!
There was an error while loading. Please reload this page.