@bigbinary/neeto-filters-frontend 2.11.16 → 2.11.18

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
@@ -71,6 +71,7 @@ export const SAMPLE_FILTER_FIELDS = [
71
71
  label: "Name",
72
72
  suffixComponent: () => <Component />
73
73
  type: "text",
74
+ preprocessor: (value) => value.trim(),
74
75
  },
75
76
  {
76
77
  key: "email",
@@ -92,6 +93,7 @@ export const SAMPLE_FILTER_FIELDS = [
92
93
  - `node`: The column in DB table corresponding to the field.
93
94
  - `label` The label to be shown just above the field in Pane.
94
95
  - `suffixComponent` The component to be shown at the end of the respective Block in filters Bar.
96
+ - `preprocessor` The function to be used to preprocess the value before applying the filter.
95
97
  - `type`: The nature/type of the field needed in pane.
96
98
  - The supported types are `text`, `number`, `decimal`, `date`, `single_date`, `time`, `single_time`, `single_option`, `multi_option` and `boolean`
97
99
  - `model`: If the node provided is **not** directly refering to the column within the table being queried for the filtered results, then we need to provide the **model** corresponding to the target table.