BFilter
Just describe filter fields. Use subclasses of FilterField.
Example
BFilter props
Property | Description | Type | Default |
---|---|---|---|
filterFields | list of query params for filtration | - | |
redefineValuesDep | BFilter subscribe to this prop changes for redefine local state variable |
| false |
realTime | call onChange by change any field value or by click to save button |
| false |
onChange | Callback that change query params and get data |
| - |
IFilterField
IGeneralFilterField<V>
IGeneralFilterField<V>
Property | Description | Type | Default |
---|---|---|---|
fieldType | type of input | - | |
id | id attribute |
| '' |
name | Field name |
| '' |
keyName | query params prop name |
| - |
placeholder | input placeholder |
| '' |
label | input label |
| keyName |
style | css for input |
| undefined |
value | filter field value that is necessary to (re)define filter object |
| - |
onChange | Callback when input value is changed |
| - |
FilterFieldType
FilterFieldType
IFilterSelect<T, V>
IFilterSelect<T, V>
IFilterSelect extends IGeneralFilterField
Property | Description | Type | Default |
---|---|---|---|
...IGeneralFilterField | ... | ... | ... |
multiple | ... |
| false |
value | query params prop value |
| - |
disabled | ... |
| false |
reduceListItem | generate list item template |
| - |
reduceElemName | generate list item name |
| undefined |
reduceValue | get item value |
| - |
getMethod | callback that will be used for getting data list |
| - |
extraParams | properties of query params that don't participate in filtration |
| null |
searchQueryParam | query param that is used for searching |
| '' |
createMethod | callback that will be used for list item creation |
| - |
onChange | Callback when selected item is changed |
| - |
IFilterFieldComponent
IFilterFieldComponent
Property | Description | Type | Default |
---|---|---|---|
component | render function (like React.FC) |
| - |
fieldType | type of input |
| |
id | id attribute |
| '' |
name | Field name |
| '' |
keyName | query params prop name |
| - |
placeholder | input placeholder |
| '' |
label | input label |
| keyName |
style | css for input |
| undefined |
value | filter field value that is necessary to (re)define filter object |
| |
onChange | Callback when value is changed |
|
IFilterDatePicker
IFilterDatePicker
IFilterDatePicker extends IGeneralFilterField
Property | Description | Type | Default |
---|---|---|---|
...IGeneralFilterField | ... | ... | ... |
format | ... |
|
|
value | query params prop value |
| - |
onChange | Callback when date is changed |
| - |
IFilterCheckbox
IFilterCheckbox
IFilterCheckbox extends IGeneralFilterField
Property | Description | Type | Default |
---|---|---|---|
...IGeneralFilterField | ... | ... | ... |
color | ... |
|
|
value | query params prop value |
| - |
onChange | Callback when checkbox is toggled |
| - |
IFilterRadio
IFilterRadio
IFilterRadio extends IGeneralFilterField
Property | Description | Type | Default |
---|---|---|---|
...IGeneralFilterField | ... | ... | ... |
text | ... |
|
|
value | query params prop value |
| - |
onChange | Callback when user selects radio button |
| - |
IFilterInput
IFilterInput
IFilterInput extends IGeneralFilterField
Property | Description | Type | Default |
---|---|---|---|
...IGeneralFilterField | ... | ... | ... |
type | input type |
|
|
value | query params prop value |
| - |
onChange | Callback when user types in input |
| - |
Last updated