Open topless opened 4 years ago
The solution might not be easy, I can give more context for who will work on it.
Here the test to add and reproduce the issue (Publication
and Publicatio
):
test('query with very similar query values.', () => {
const state = [['file_type', 'pdf'], ['type', 'Publication']];
const query = ['type', 'Publicatio'];
const newState = updateQueryFilters(query, state);
expect(newState).toEqual([
['file_type', 'pdf'],
['type', 'Publication'],
['type', 'Publicatio'],
]);
const state2 = [['file_type', 'pdf'], ['type', 'Publicatio']];
const query2 = ['type', 'Publication'];
const newState2 = updateQueryFilters(query2, state2);
expect(newState2).toEqual([
['file_type', 'pdf'],
['type', 'Publication'],
['type', 'Publicatio'],
]);
});
When there are facets that start with the same name they cannot be both selected.