@onehat/ui 0.3.120 → 0.3.121

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.120",
3
+ "version": "0.3.121",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -44,6 +44,7 @@ export default function withFilters(WrappedComponent) {
44
44
  customFilters = [], // of shape: { title, type, field, value, getRepoFilters(value) }
45
45
  minFilters = 3,
46
46
  maxFilters = 6,
47
+ onFilterChange,
47
48
 
48
49
  // withData
49
50
  Repository,
@@ -192,6 +193,9 @@ export default function withFilters(WrappedComponent) {
192
193
  if (save && id) {
193
194
  setSaved(id + '-filters', filters);
194
195
  }
196
+ if (onFilterChange) {
197
+ onFilterChange(filters);
198
+ }
195
199
  },
196
200
  onFilterChangeValue = (field, value) => {
197
201
  // handler for when a filter value changes