@acorex/cdk 20.2.0-next.0 → 20.2.0-next.2
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/common/index.d.ts
CHANGED
|
@@ -570,7 +570,9 @@ declare class AXDataSource<T = unknown> {
|
|
|
570
570
|
sort(...value: AXDataSourceSortOption[]): void;
|
|
571
571
|
clearFilter(): void;
|
|
572
572
|
reset(): void;
|
|
573
|
-
refresh(
|
|
573
|
+
refresh(options?: {
|
|
574
|
+
reset?: boolean;
|
|
575
|
+
}): void;
|
|
574
576
|
find(key: unknown): T | Promise<T>;
|
|
575
577
|
}
|
|
576
578
|
declare function convertArrayToDataSource<T>(items: T[], options?: {
|
|
@@ -1082,10 +1082,12 @@ class AXDataSource {
|
|
|
1082
1082
|
this._page = 0;
|
|
1083
1083
|
this._totalCount = 0;
|
|
1084
1084
|
}
|
|
1085
|
-
refresh() {
|
|
1085
|
+
refresh(options = { reset: true }) {
|
|
1086
1086
|
const currentFilter = this._query.filter;
|
|
1087
1087
|
const currentSort = this._query.sort;
|
|
1088
|
-
|
|
1088
|
+
if (options.reset) {
|
|
1089
|
+
this.reset();
|
|
1090
|
+
}
|
|
1089
1091
|
this._query.filter = currentFilter;
|
|
1090
1092
|
this._query.sort = currentSort;
|
|
1091
1093
|
this.load();
|