You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -181,9 +181,9 @@ Below is the list of invocable methods of the Adapter API with description and l
181
181
|[append](https://dhilt.github.io/ngx-ui-scroll/#/adapter#append-prepend)|(options: {<br> items: any[],<br> eof?: boolean<br>}) <br><br> (items: any | any[], eof?: boolean) *<br><sub>* old signature, deprecated</sub>|Adds items to the end of the uiScroll dataset. If eof parameter is not set, items will be added and rendered immediately, they will be placed right after the last item in the uiScroll buffer. If eof parameter is set to true, items will be added and rendered only if the end of the dataset is reached; otherwise, these items will be virtualized. See also [bof/eof](https://dhilt.github.io/ngx-ui-scroll/#/adapter#bof-eof) demo. |
182
182
|[prepend](https://dhilt.github.io/ngx-ui-scroll/#/adapter#append-prepend)|(options: {<br> items: any[],<br> bof?: boolean<br>}) <br><br> (items: any | any[], bof?: boolean) *<br><sub>* old signature, deprecated</sub>|Adds items to the beginning of the uiScroll dataset. If bof parameter is not set, items will be added and rendered immediately, they will be placed right before the first item in the uiScroll buffer. If bof parameter is set to true, items will be added and rendered only if the beginning of the dataset is reached; otherwise, these items will be virtualized. See also [bof/eof](https://dhilt.github.io/ngx-ui-scroll/#/adapter#bof-eof) demo. |
183
183
|[check](https://dhilt.github.io/ngx-ui-scroll/#/adapter#check-size)||Checks if any of current items changed it's size and runs a procedure to provide internal consistency and new items fetching if needed. |
184
-
|[remove](https://dhilt.github.io/ngx-ui-scroll/#/adapter#remove)|(predicate: ItemsPredicate)<br><br>type ItemsPredicate =<br> (item: ItemAdapter) =><br> boolean|Removes items from current buffer. Predicate is a function to be applied to every item presently in the buffer. Predicate must return boolean value. If predicate's return value is true, the item will be removed. _Note!_ Current implementation allows to remove only a continuous series of items per call. If you want to remove, say, 5 and 7 items, you should call the remove method twice. Removing a series of items from 5 to 7 could be done in a single call. |
184
+
|[remove](https://dhilt.github.io/ngx-ui-scroll/#/adapter#remove)|(options: {<br> predicate?: ItemsPredicate,<br> indexes?: number[],<br> increase?: boolean<br>}) <br><br>(func: ItemsPredicate) *<br><sub>* old signature, deprecated</sub><br><br> type ItemsPredicate =<br> (item: ItemAdapter) =><br> boolean|Removes items form buffer and/or virtually. Predicate is a function to be applied to every item presently in the buffer. Predicate must return a boolean value. If predicate's return value is true, the item will be removed. Alternatively, if _indexes_ array is passed, the items whose indexes match the list will be removed. Only one of the _predicate_ and _indexes_ options is allowed. In case of _indexes_, the deletion is performed also virtually. By default, indexes of the items following the deleted ones are decremented. Instead, if _increase_ is set to _true_, indexes of the items before the removed ones will be increased. |
185
185
|[clip](https://dhilt.github.io/ngx-ui-scroll/#/adapter#clip)|(options: {<br> forwardOnly?: boolean,<br> backwardOnly?: boolean<br>})|Removes out-of-viewport items on demand. The direction in which invisible items should be clipped can be specified by passing an options object. If no options is passed (or both properties are set to _true_), clipping will occur in both directions. |
186
-
|[insert](https://dhilt.github.io/ngx-ui-scroll/#/adapter#insert)|(options: {<br> items: any[],<br> before?: ItemsPredicate,<br> after?: ItemsPredicate,<br> decrease?: boolean<br>})|Inserts items _before_ or _after_ the one that satisfies the predicate condition. Only one of _before_ and _after_ options is allowed. Indexes increase by default. Decreasing strategy can be enabled via _decrease_ option. |
186
+
|[insert](https://dhilt.github.io/ngx-ui-scroll/#/adapter#insert)|(options: {<br> items: any[],<br> before?: ItemsPredicate,<br> after?: ItemsPredicate,<br> decrease?: boolean<br>})|Inserts items _before_ or _after_ the one that presents in the buffer and satisfies the predicate condition. Only one of the_before_ and _after_ options is allowed. Indexes increase by default. Decreasing strategy can be enabled via _decrease_ option. |
187
187
188
188
Along with the documented API there are some undocumented features that can be treated as experimental. They are not tested enough and might change over time. Some of them can be found on the [experimental tab](https://dhilt.github.io/ngx-ui-scroll/#/experimental) of the demo app.
189
189
@@ -193,7 +193,7 @@ All of the Adapter methods return Promise resolving at the moment when the scrol
0 commit comments