inveniosoftware / react-searchkit

React component library for interacting with a REST API.
https://inveniosoftware.github.io/react-searchkit/
MIT License
78 stars 40 forks source link

InvenioSerializer: Remove parent category in nested filters #257

Closed psaiz closed 7 months ago

psaiz commented 8 months ago

:heart: Thank you for your contribution!

Description

The nested facets are not working properly. A request like f=type%3ADataset&f=type%3ADocumentation%2Bsubtype%3AAbout gets translated into type=Dataset&type=Documentation&subtype=About, instead of type=Dataset&subtype=About.

Note that the comments in the code (line 45-60) were correct. The implementation was different :-)

psaiz commented 8 months ago

Changed a bit to make it more similar to the RDM. Instance of putting only the child category, it concatenates the value of the parent and the child with '::'