Conversation
…aCollection methods
| - `id: string | number` - the old id of an item | ||
| - `newId: string | number` - optional, the new id; auto-generated if not set | ||
| - `silent: boolean` - true, to prevent changing the id; otherwise, false | ||
| - `silent: boolean` - optional, *true*, to prevent changing the id; otherwise, *false* |
There was a problem hiding this comment.
@mafanya23 кажется тут не то описание. silent - если использовать метод с включенным данным флагом, метод будет работать в "тихом" режиме, то есть - без вызова событий. Метод сработает, события будут проигнорированы.
| - `add: boolean` - optional, defines whether each next filtering will be applied to the already filtered data (<i>true</i>), or to the initial data (<i>false</i>, default) | ||
| - `add: boolean` - optional, defines whether each next filtering will be applied to the already filtered data (*true*), or to the initial data (*false*, default) | ||
| - `permanent: boolean` - optional, *true* to make the current filter permanent. It will be applied even if the next filtering doesn't have the `add:true` property in its configuration object. Such a filter can be removed just with the [resetFilter()](data_collection/api/datacollection_resetfilter_method.md) method | ||
| - `silent: boolean` - optional, if *true*, the update of the DataCollection state won't trigger the component repainting, *false* by default |
There was a problem hiding this comment.
@mafanya23 откуда тут перерисовка?)) Это частный случай, а может и сработает. Можно в примечаниях написать, что:
после использования данного метода с включенным флагом
silentвам потребуется принудительная перерисовка компонента при помощи методаpaint()
Флаг silent вызывает метод без вызова событий.
|
|
||
| //searching for an item by the attribute key | ||
| const item = component.data.find({by:"text",match:"Manager"}); | ||
| const item = component.data.find({ by:"text",match:"Manager" }); |
There was a problem hiding this comment.
@mafanya23 понимаю, что правка локальная. Если есть возможность, поправ пожалуйста отступы в примерах:

There was a problem hiding this comment.
@mafanya23 почти во всех примерах есть такая проблема
|
|
||
| @example: | ||
| component.data.getLength(); | ||
| const items = component.data.getLength(); |
There was a problem hiding this comment.
@mafanya23 метод возвращает длину коллекции. Название переменной можно было назвать dataLength
There was a problem hiding this comment.
@mafanya23 по описанию подавлю. В TreeCollection этот метод коварен, и вместо длинны всех данных отобразит длину уровня. Вроде есть об этом запись в TreeCollection. Но я подумал, что в гайдах стоит упомянуть, если не будешь делать отдельный гайд по TreeCollection
| @short: reduces the array to a single value | ||
|
|
||
| @signature: {'reduce(callback: (acc: any, item: any) => any, acc: any): any;'} | ||
| @signature: {'reduce(callback: (acc: any, item: any, index?: number) => any, acc: any): any;'} |
|
|
||
| **Related sample**: [Data. Parse](https://snippet.dhtmlx.com/0zrxtmvi) | ||
|
|
||
| ## Checking whether data is loaded |
There was a problem hiding this comment.
@mafanya23 Хорошо, мы проверяем загруженные данным. А как мы их загрузили? Нет описания ленивой загрузки.
| grid.data.save("http://userurl/"); | ||
|
|
||
| //or | ||
| grid.data.save(new DataProxy({ url:"http://userurl/" })); |
There was a problem hiding this comment.
@mafanya23 это ведь тоже к загрузке относится, в гайде инфы нет DataProxy
|
|
||
| ~~~jsx | ||
| // creating a new grid | ||
| const grid2 = new dhx.Grid(document.body); |
There was a problem hiding this comment.
@mafanya23 будет просто ошибка. Grid без свойства columns не инициализируется
| @@ -0,0 +1,321 @@ | |||
| --- | |||
There was a problem hiding this comment.
@mafanya23 все примеры необходимо привести в порядок
| @@ -0,0 +1,182 @@ | |||
| --- | |||
There was a problem hiding this comment.
@mafanya23 описание с методов тут не годится. Это просто дублирование информации. Про фильтрацию есть, что рассказать и показать. Особенно про smartSorting, которая по факту мультисортировка. Есть даже примеры в snippet tool
No description provided.