Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/data_collection/api/datacollection_add_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ description: You can explore the add method of DataCollection in the documentati

@short: adds a new item to the component

:::note
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.
:::

@signature: {'add(new_item: object | object[], index?: number): (string | number) | (string | number)[];'}

@params:
Expand Down
10 changes: 6 additions & 4 deletions docs/data_collection/api/datacollection_afteradd_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ description: You can explore the afterAdd event of DataCollection in the documen

# afterAdd

@short: fires after adding a new item into a data collection
@short: fires after adding a new item/items into a data collection

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

@params:
- `newItem: object` - the object of an added item
- `batch: array` - an array of added items
- `index: number` - the index of the added item within the batch

@example:
component.data.events.on("afterAdd", function(newItem){
console.log("A new item is added");
component.data.events.on("afterAdd", function(newItem, batch, index){
console.log("New items are added");
});

@descr:
Expand Down
10 changes: 6 additions & 4 deletions docs/data_collection/api/datacollection_afterremove_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ description: You can explore the afterRemove event of DataCollection in the docu

# afterRemove

@short: Fires after removing an item from a data collection
@short: Fires after removing an item/items from a data collection

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

@params:
- `removedItem: object` - the object of a removed item
- `batch: array` - an array of removed items
- `index: number` - the index of the removed item within the batch

@example:
component.data.events.on("afterRemove", function(removedItem){
console.log("An item is removed");
component.data.events.on("afterRemove", function(removedItem, batch, index){
console.log("Items are removed");
});

@descr:
Expand Down
10 changes: 6 additions & 4 deletions docs/data_collection/api/datacollection_beforeadd_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ description: You can explore the beforeAdd event of DataCollection in the docume

# beforeAdd

@short: fires before adding a new item into a data collection
@short: fires before adding a new item/items into a data collection

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

@params:
- `newItem: object` - the object of an added item
- `batch: array` - an array of added items
- `index: number` - the index of the added item within the batch

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

@example:
component.data.events.on("beforeAdd", function(newItem){
console.log("A new item will be added");
component.data.events.on("beforeAdd", function(newItem, batch, index){
console.log("New items will be added");
return true;
});

Expand Down
10 changes: 6 additions & 4 deletions docs/data_collection/api/datacollection_beforeremove_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ description: You can explore the beforeRemove event of DataCollection in the doc

# beforeRemove

@short: fires before removing an item from a data collection
@short: fires before removing an item/items from a data collection

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

@params:
- `removedItem: object` - the object of an item to remove
- `batch: array` - an array of removed items
- `index: number` - the index of the removed item within the batch

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

@example:
component.data.events.on("beforeRemove", function(removedItem){
console.log("An item will be removed");
component.data.events.on("beforeRemove", function(removedItem, batch, index){
console.log("Items will be removed");
return true;
});

Expand Down
14 changes: 14 additions & 0 deletions docs/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ description: You can explore what's new in DHTMLX Suite and its release history

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

## Version 9.2.5

Released on November 28, 2025

### Updates

- 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

### Fixes

- Grid. Improved performance of adding and removing data via the `add()` and `remove()` methods when the `adjust` configuration is enabled
- Grid. The issue where the combo filter with enabled `multiselection` displayed all options ignoring other active filters is fixed
- 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

## Version 9.2.4

Released on November 17, 2025
Expand Down
Loading