Skip to content

Commit 1c42e71

Browse files
committed
chore: update crud module readme
1 parent 933f10c commit 1c42e71

File tree

1 file changed

+35
-1
lines changed
  • packages/react-material-ui/src/modules/crud

1 file changed

+35
-1
lines changed

packages/react-material-ui/src/modules/crud/README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ To filter table items, the `filters` prop can be passed to the `tableProps` obje
134134
],
135135
columns: 3,
136136
},
137+
{
138+
id: 'range',
139+
label: 'Date range',
140+
type: 'dateRange',
141+
columns: 4,
142+
},
137143
],
138144
}}
139145
/>
@@ -147,9 +153,37 @@ Each filter can have the following set of attributes:
147153
- `columns`: number of columns occupied by the input in a grid of 12 columns;
148154
- `size`: overall size of the input, small or medium;
149155
- `operator`: string that describes how much of the input value should match the data value;
150-
- `type`: the type of the filter input, one of text, autocomplete or select;
156+
- `type`: the type of the filter input, one of text, autocomplete, select, multiSelect, date and dateRange;
151157
- `options`: array of options displayed in the autocomplete or select inputs.
152158

159+
### Filter types
160+
161+
#### text
162+
163+
Simple text field, filtering data based on a single string.
164+
165+
#### autocomplete
166+
167+
Select field with the ability to search the items listed based on a text field.
168+
169+
### select
170+
171+
Standard select field, filtering data based on a selected option.
172+
173+
### multiSelect
174+
175+
Another approach to the Select field, with the ability to select multiple items.
176+
177+
### date
178+
179+
Standard date picker, filtering data based on a timestamp value.
180+
181+
### dateRange
182+
183+
Another approach to the date picker, with the ability to select start and end date through a single field.
184+
185+
## External search
186+
153187
A callback can be passed to the module props if the current state of filters is needed after each input change. This callback is called `filterCallback` and is passed outside of the `tableProps`, as follows:
154188

155189
```jsx

0 commit comments

Comments
 (0)