@xh/hoist 72.0.0-SNAPSHOT.1737063455869 → 72.0.0-SNAPSHOT.1737150473558

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/CHANGELOG.md CHANGED
@@ -5,6 +5,7 @@
5
5
  ### 🐞 Bug Fixes
6
6
 
7
7
  * Fixed `ViewManagerModel` unique name validation.
8
+ * `GridModel.restoreDefaultsAsync()` now restores default filter rather than simply clearing it.
8
9
 
9
10
  ### ⚙️ Technical
10
11
 
@@ -600,6 +600,7 @@ export class GridModel extends HoistModel {
600
600
  this.colChooserModel = this.parseChooserModel(colChooserModel);
601
601
  this.selModel = this.parseSelModel(selModel);
602
602
  this.filterModel = this.parseFilterModel(filterModel);
603
+ if (this.filterModel) this._defaultState.filter = this.filterModel.filter;
603
604
  if (persistWith) initPersist(this, persistWith);
604
605
  this.experimental = this.parseExperimental(experimental);
605
606
  this.onKeyDown = onKeyDown;
@@ -644,12 +645,12 @@ export class GridModel extends HoistModel {
644
645
  if (!confirmed) return false;
645
646
  }
646
647
 
647
- const {columns, sortBy, groupBy} = this._defaultState;
648
+ const {columns, sortBy, groupBy, filter} = this._defaultState;
648
649
  this.setColumns(columns);
649
650
  this.setSortBy(sortBy);
650
651
  this.setGroupBy(groupBy);
651
652
 
652
- this.filterModel?.clear();
653
+ this.filterModel?.setFilter(filter);
653
654
 
654
655
  if (this.autosizeOptions.mode === 'managed') {
655
656
  await this.autosizeAsync();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "72.0.0-SNAPSHOT.1737063455869",
3
+ "version": "72.0.0-SNAPSHOT.1737150473558",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",