@xh/hoist 55.3.1 → 55.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## v55.3.2 - 2023-03-22
4
+
5
+ ### 🐞 Bug Fixes
6
+ * Fix grid bug whereby LocalDate filter entered via FilterChooser was causing column filtering
7
+ to fail.
8
+
9
+
3
10
  ## v55.3.1 - 2023-03-14
4
11
 
5
12
  ### 🐞 Bug Fixes
@@ -66,7 +66,7 @@ export class GridFilterFieldSpec extends BaseFilterFieldSpec {
66
66
  // Implementation
67
67
  //------------------------
68
68
  loadValuesFromSource() {
69
- const {filterModel, field, source} = this,
69
+ const {filterModel, field, source, sourceField} = this,
70
70
  columnFilters = filterModel.getColumnFilters(field),
71
71
  sourceStore = source instanceof View ? source.cube.store : source,
72
72
  allRecords = sourceStore.allRecords;
@@ -83,7 +83,10 @@ export class GridFilterFieldSpec extends BaseFilterFieldSpec {
83
83
  // Get values from current column filter
84
84
  const filterValues = [];
85
85
  columnFilters.forEach(filter => {
86
- const newValues = castArray(filter.value).map(value => filterModel.toDisplayValue(value));
86
+ const newValues = castArray(filter.value).map(value => {
87
+ value = sourceField.parseVal(value);
88
+ return filterModel.toDisplayValue(value);
89
+ });
87
90
  filterValues.push(...newValues);
88
91
  });
89
92
 
@@ -142,7 +142,7 @@ export class ValuesTabModel extends HoistModel {
142
142
 
143
143
  @action
144
144
  private doSyncWithFilter() {
145
- const {values, columnFilters, gridFilterModel} = this,
145
+ const {values, columnFilters, gridFilterModel, fieldSpec} = this,
146
146
  {fieldType} = this.headerFilterModel;
147
147
 
148
148
  if (isEmpty(columnFilters)) {
@@ -157,7 +157,10 @@ export class ValuesTabModel extends HoistModel {
157
157
  filterValues = [];
158
158
 
159
159
  arr.forEach(filter => {
160
- const newValues = castArray(filter.value).map(value => gridFilterModel.toDisplayValue(value));
160
+ const newValues = castArray(filter.value).map(value => {
161
+ value = fieldSpec.sourceField.parseVal(value);
162
+ return gridFilterModel.toDisplayValue(value);
163
+ });
161
164
  filterValues.push(...newValues); // Todo: Is this safe?
162
165
  });
163
166
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "55.3.1",
3
+ "version": "55.3.2",
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",