react-spectrum
4a37eb89 - feat: (React Aria) Implement filtering on a per CollectionNode basis (#8641)

Commit
19 days ago
feat: (React Aria) Implement filtering on a per CollectionNode basis (#8641) * account for loaders in base collection filter * rough implementation for listbox * replace other instances of createLeaf/createBranch to use node classes * fix bugs with subdialog filtering, arrow nav, dividers, etc * fix case where arrow nav wasnt working post filter * update types and class node structure * prep stories * fix * add autocomplete gridlist filtering * taglist filter support * fixing lint * fix tag group keyboard nav and lint * adding support for table filtering * fix tableCollection filter so it doesnt need to call filterChildren directly * create common use nodes for specific filtering patterns * fix ssr * refactor to accept a node rather than a string in the filter function * fix lint * make node param in autocomplete non breaking * adding tests, make sure we only apply autocomplete attributes if the wrapped collection is filterable * prevent breaking change in CollectionBuilder by still accepting string for CollectionNodeClass * fix tests and pass submenutrigger node to filterFn * small clean up * small fixes * addressing more review comments * simplifying setProps logic since we have already have id when calling it * forgot to use generic for autocomplete filter * ugh docs typescript * review comments * add example testing the Autocomplete generic * fix: Autocomplete context refactor (#8695) * autoimport.... * replace internal autocomplete context * add FieldInputContext in place of input context and search/textfield context in autocomplete * fix build * removing erroneous autoimports * add ability for user to provide independent filter text * fix lint * fix some more tests * bring back controlled input value at autocomplete level * adding prop to disable virtual focus * another stab at the types * clear autocomplete contexts so that they dont leak to nested collections * add tests for disallowVirtualFocus works with listbox and menu * fix types * refactor CollectionNode to read from static property and properly clone from subclass * naming from reviews and moving contexts out of autocomplete * review comments * properly add all descendants of a cloned node when filtering fixes case where a filtered table keyboard navigation was broken since we had cloned the old collection rather than creating a new one from scratch * support filtering when there are sections in gridlist * fix mobile screen reader detection for disabling virtual focus fixes case where opening a nested autocomplete subdialog in a autocomplete menu via ENTER didnt allow the user to navigate the subdialogs options via keyboard * review comments
Author
Parents
Loading