Skip to content

Commit c302820

Browse files
authored
Merge pull request #80 from DHTMLX/next
[add] what's new and updates for v9.2.5
2 parents 3bdbcda + 8310805 commit c302820

File tree

6 files changed

+42
-16
lines changed

6 files changed

+42
-16
lines changed

docs/data_collection/api/datacollection_add_method.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ description: You can explore the add method of DataCollection in the documentati
88

99
@short: adds a new item to the component
1010

11+
:::note
12+
Please note that data should be loaded into DataCollection via the `parse()` method. The `add()` method is primarily intended for loading standalone elements or small groups of elements, so its loads data slower than the `parse()` method.
13+
:::
14+
1115
@signature: {'add(new_item: object | object[], index?: number): (string | number) | (string | number)[];'}
1216

1317
@params:

docs/data_collection/api/datacollection_afteradd_event.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ description: You can explore the afterAdd event of DataCollection in the documen
66

77
# afterAdd
88

9-
@short: fires after adding a new item into a data collection
9+
@short: fires after adding a new item/items into a data collection
1010

11-
@signature: {'afterAdd: (newItem: object) => void;'}
11+
@signature: {'afterAdd: (newItem: IDataItem, batch: IDataItem[], index: number) => void;'}
1212

1313
@params:
1414
- `newItem: object` - the object of an added item
15+
- `batch: array` - an array of added items
16+
- `index: number` - the index of the added item within the batch
1517

1618
@example:
17-
component.data.events.on("afterAdd", function(newItem){
18-
console.log("A new item is added");
19+
component.data.events.on("afterAdd", function(newItem, batch, index){
20+
console.log("New items are added");
1921
});
2022

2123
@descr:

docs/data_collection/api/datacollection_afterremove_event.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ description: You can explore the afterRemove event of DataCollection in the docu
66

77
# afterRemove
88

9-
@short: Fires after removing an item from a data collection
9+
@short: Fires after removing an item/items from a data collection
1010

11-
@signature: {'afterRemove: (removedItem: object) => void;'}
11+
@signature: {'afterRemove: (removedItem: IDataItem, batch: IDataItem[], index: number) => void;'}
1212

1313
@params:
1414
- `removedItem: object` - the object of a removed item
15+
- `batch: array` - an array of removed items
16+
- `index: number` - the index of the removed item within the batch
1517

1618
@example:
17-
component.data.events.on("afterRemove", function(removedItem){
18-
console.log("An item is removed");
19+
component.data.events.on("afterRemove", function(removedItem, batch, index){
20+
console.log("Items are removed");
1921
});
2022

2123
@descr:

docs/data_collection/api/datacollection_beforeadd_event.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ description: You can explore the beforeAdd event of DataCollection in the docume
66

77
# beforeAdd
88

9-
@short: fires before adding a new item into a data collection
9+
@short: fires before adding a new item/items into a data collection
1010

11-
@signature: {'beforeAdd: (newItem: object) => boolean | void;'}
11+
@signature: {'beforeAdd: (newItem: IDataItem, batch: IDataItem[], index: number) => boolean | void;'}
1212

1313
@params:
1414
- `newItem: object` - the object of an added item
15+
- `batch: array` - an array of added items
16+
- `index: number` - the index of the added item within the batch
1517

1618
@returns:
1719
Return `false` to prevent an item adding into a data collection; otherwise, `true`.
1820

1921
@example:
20-
component.data.events.on("beforeAdd", function(newItem){
21-
console.log("A new item will be added");
22+
component.data.events.on("beforeAdd", function(newItem, batch, index){
23+
console.log("New items will be added");
2224
return true;
2325
});
2426

docs/data_collection/api/datacollection_beforeremove_event.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@ description: You can explore the beforeRemove event of DataCollection in the doc
66

77
# beforeRemove
88

9-
@short: fires before removing an item from a data collection
9+
@short: fires before removing an item/items from a data collection
1010

11-
@signature: {'beforeRemove: (removedItem: object) => boolean | void;'}
11+
@signature: {'beforeRemove: (removedItem: IDataItem, batch: IDataItem[], index: number) => boolean | void;'}
1212

1313
@params:
1414
- `removedItem: object` - the object of an item to remove
15+
- `batch: array` - an array of removed items
16+
- `index: number` - the index of the removed item within the batch
1517

1618
@returns:
1719
Return `false` to block removing an item from a data collection; otherwise, `true`.
1820

1921
@example:
20-
component.data.events.on("beforeRemove", function(removedItem){
21-
console.log("An item will be removed");
22+
component.data.events.on("beforeRemove", function(removedItem, batch, index){
23+
console.log("Items will be removed");
2224
return true;
2325
});
2426

docs/whatsnew.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ description: You can explore what's new in DHTMLX Suite and its release history
88

99
Before updating DHTMLX to the latest version, please check the [Migration to Newer Versions](migration.md) guide to avoid possible breakdowns.
1010

11+
## Version 9.2.5
12+
13+
Released on November 28, 2025
14+
15+
### Updates
16+
17+
- DataCollection. The [`beforeAdd`](/data_collection/api/datacollection_beforeadd_event/), [`afterAdd`](/data_collection/api/datacollection_afteradd_event/), [`beforeRemove`](/data_collection/api/datacollection_beforeremove_event/), and [`afterRemove`](/data_collection/api/datacollection_afterremove_event/) events are updated to include the `batch` and `index` parameters for handling batch operations
18+
19+
### Fixes
20+
21+
- Grid. Improved performance of adding and removing data via the `add()` and `remove()` methods when the `adjust` configuration is enabled
22+
- Grid. The issue where the combo filter with enabled `multiselection` displayed all options ignoring other active filters is fixed
23+
- TreeCollection. The issue where the `items` property of a parent object returned by the `getItem()` and `find()` methods included a removed child item is fixed
24+
1125
## Version 9.2.4
1226

1327
Released on November 17, 2025

0 commit comments

Comments
 (0)