ngx-wapp-components 3.5.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,54 +19,22 @@ After building your library with `ng build wapp-components`, go to the dist fold
19
19
 
20
20
  Run `ng test wapp-components` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
21
 
22
- ## Initial page for tables
23
-
24
- Use `[initialPage]="3"` with `[rowsPerPage]="10"` on `w-table` or
25
- `w-tree-table` to start on page 3 (offset 20). The default is page 1.
26
- Only positive integers are accepted; choose a page that exists in the data.
27
- For tree tables, pagination counts root nodes, not their children.
28
-
29
- The initial page is applied once, when data and the effective page size
30
- are available, including when data arrives asynchronously. Later navigation,
31
- filtering, data refreshes and page-size changes do not reapply it. Without
32
- `rowsPerPage`, the existing automatic page-size calculation is preserved.
33
-
34
- ## Session pagination
35
-
36
- Set a stable, unique `paginationId` on `w-table`, `w-tree-table` or
37
- `w-table-lazy` to identify its pagination in the current tenant's session:
38
-
39
- ```html
40
- <w-table paginationId="customers-list" ...></w-table>
41
- <w-tree-table paginationId="categories-tree" ...></w-tree-table>
42
- <w-table-lazy paginationId="orders-list" ...></w-table-lazy>
43
- ```
44
-
45
- The saved page offset and page size take priority over `initialPage` and
46
- `rowsPerPage` when the component is created again. In non-lazy tables,
47
- restoration waits for data. Page navigation, the page-size selector and
48
- filter resets update the saved state. Configure the id before initialization
49
- and use different ids for independent lists, even if their row identifiers
50
- are the same. Storage uses the existing tenant from `LocalStorageService`.
51
-
52
- Without `paginationId`, `w-table` and `w-tree-table` do not read or write
53
- pagination in session. For backwards compatibility, `w-table-lazy` continues
54
- using `wappTableLazyLoadingObject.identificator` as its key when the new input
55
- is omitted. With an explicit id, only that id is used, not the legacy key.
56
-
57
- Pagination is stored directly under its id, without an automatic prefix.
58
- Choose ids distinct from other tenant session entries (such as filter panels).
59
- Existing entries using the old `table-paginator_` prefix are not restored;
60
- new pagination is saved under the unprefixed id.
61
-
62
- Session pagination also includes `sortField` and `sortOrder` (`1` ascending,
63
- `-1` descending) for single-column sorting in all three table components.
64
- Sorting changes are saved immediately and preserved when navigating or changing
65
- page size. Restoring a local table sorts its data and updates its sort indicator;
66
- the lazy table includes the restored sorting in its first `queryElements` event.
67
- Existing entries without sorting remain valid and use the default unsorted
68
- state. External calls to the lazy table's `setStoredTablePagination` that only
69
- change `first` and `rows` retain the current sorting.
22
+ ## Local table search persistence
23
+
24
+ Set a stable, unique `paginationId` on `w-table` or `w-tree-table` to persist
25
+ the page offset, page size, sorting and global search text in session storage.
26
+ The optional `StoreableTablePagination.query.searchInput` field stores the text.
27
+
28
+ - `w-table` restores search only when `wappTableObject.hasGlobalSearch` is enabled.
29
+ - `w-tree-table` restores the text of its global search input.
30
+ - Restoration updates both the visible input and the actual filter, preserving
31
+ the saved page within the filtered results, including when data arrives asynchronously.
32
+ - Clearing the search stores an empty string so an older search is not restored.
33
+ Calling `w-table.clearFilters()` also clears the visible and stored search.
34
+ - Existing entries without `searchInput` remain compatible and start with an empty search.
35
+ - Without `paginationId`, searching still works but its state is not persisted.
36
+
37
+ This search persistence does not apply to `w-table-lazy`.
70
38
 
71
39
  ## Further help
72
40