Skip to content

Commit d144502

Browse files
Data Layer: Add Nested Data Update Notes in store.push() Topics (#8666)
1 parent b48a694 commit d144502

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

api-reference/30 Data Layer/Store/3 Methods/push(changes).md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ The following code shows how to use the **push(changes)** method for each change
112112
- The **DataSource** does not automatically sort, group, filter, or otherwise shape pushed data. For this reason, the **DataSource** and the UI component bound to it can be out of sync. To prevent this, enable the [reshapeOnPush](/api-reference/30%20Data%20Layer/DataSource/1%20Configuration/reshapeOnPush.md '/Documentation/ApiReference/Data_Layer/DataSource/Configuration/#reshapeOnPush') property. We also recommend specifying the [pushAggregationTimeout](/api-reference/30%20Data%20Layer/DataSource/1%20Configuration/pushAggregationTimeout.md '/Documentation/ApiReference/Data_Layer/DataSource/Configuration/#pushAggregationTimeout') property to reduce the number of updates and recalculations.
113113
- The **push** method does not raise data source modification events (for instance, **onInserted**, **onRemoved**, **onUpdated**). Handle the [onPush](/api-reference/30%20Data%20Layer/Store/1%20Configuration/onPush.md '/Documentation/ApiReference/Data_Layer/ArrayStore/Configuration/#onPush') event to perform actions when data changes are pushed to a store.
114114
- The **push** method does not modify the remote data source. It is used to push changes from the data source to the local store without reloading data.
115+
- To update nested data, specify `changes.data` as a nested object:
116+
117+
store.push([{ type: "update", data: { Address: { City: "Bentonville" } }, key: key }]);
115118

116119
[/note]
117120

concepts/70 Data Binding/5 Data Layer/3 Data Modification/30 Integration with Push Services.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ Call this method in the event handlers for client functions that can be invoked
2424
name: "Chart SignalR"
2525
}
2626

27-
After being notified, the **DataSource** can reapply sorting, filtering, grouping, and other data processing settings if you set the [reshapeOnPush](/api-reference/30%20Data%20Layer/DataSource/1%20Configuration/reshapeOnPush.md '/Documentation/ApiReference/Data_Layer/DataSource/Configuration/#reshapeOnPush') property to **true**. If pushes come too frequently, specify [pushAggregationTimeout](/api-reference/30%20Data%20Layer/DataSource/1%20Configuration/pushAggregationTimeout.md '/Documentation/ApiReference/Data_Layer/DataSource/Configuration/#pushAggregationTimeout') to aggregate them.
27+
[note]
28+
29+
To update nested data, specify `changes.data` as a nested object:
30+
31+
store.push([{ type: "update", data: { Address: { City: "Bentonville" } }, key: key }]);
32+
33+
[/note]
34+
35+
If you set [reshapeOnPush](/api-reference/30%20Data%20Layer/DataSource/1%20Configuration/reshapeOnPush.md '/Documentation/ApiReference/Data_Layer/DataSource/Configuration/#reshapeOnPush') to **true**, the **DataSource** reapplies sorting, filtering, grouping, and other data processing settings after it receives a notification. If pushes occur too frequently, set [pushAggregationTimeout](/api-reference/30%20Data%20Layer/DataSource/1%20Configuration/pushAggregationTimeout.md '/Documentation/ApiReference/Data_Layer/DataSource/Configuration/#pushAggregationTimeout') to aggregate them.
2836

2937
#include btn-open-demo with {
3038
href: "https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/RealTimeUpdates/"

0 commit comments

Comments
 (0)