Open juliecki opened 4 months ago
That reset
is used in filterTemplate
: https://primereact.org/multiselect/#api.MultiSelect.props.filterTemplate
/**
* The template of filter element.
*/
filterTemplate?: React.ReactNode | ((options: MultiSelectTemplateOptions) => React.ReactNode);
/**
* Custom filter template options.
*/
interface MultiSelectTemplateOptions {
/**
* Style class of the filter.
*/
className: string;
/**
* The filter element.
*/
element: HTMLDivElement;
/**
* Style class of the filter icon.
*/
filterIconClassName: string;
/**
* The filter input options.
*/
filterOptions?: MultiSelectFilterOptions;
/**
* The props of multiselect header.
*/
props?: any;
}
Can you explain what you need reset
to do?
reset
should provide a button to reset the selected items. Currently you have to select all and unselect all to reset the selection. This is not a nice UX...
Other than that feels the provided "close" button like this missing "reset" button.
Describe the bug
The documentation describes a
reset
filter function which cannot be accessed:DOC:
CODE:
Reproducer
https://stackblitz.com/edit/vitejs-vite-3ekfuv?file=src%2FApp.tsx
PrimeReact version
10.6.3
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome
Steps to reproduce the behavior
No response
Expected behavior
reset
should be available likefilter