elastic / elastic/search-ui

Programmatically selected disjunctive facets hidden under +More

Open
#779 2 comments 0 reactions 0 assignees View on GitHub
feature pinned
Dominant language
TypeScript
Stars
2k
Forks
383
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

When adding a filter against a disjunctive facet via the `addFilter` method, the selected value may be hidden under the `+ More` link when rendering through the `` component.

**Expected behavior**

The selected facet value(s) should always be visible.

**Screenshots**

Given a facet with a large number of results:

![image](https://user-images.githubusercontent.com/1057607/175948886-46b2ff49-e44b-4e00-b409-b0a9174e1a4f.png)

After executing something like `addFilter('category.keyword', 'Resource Collection')` the selected 'Resource Collection' facet will not be visible until clicking `+ More`:

![image](https://user-images.githubusercontent.com/1057607/175949328-d77979a5-ef95-444d-96a0-99aa5f0f655a.png)

**Which backends and packages are you using:**
Backend: Elasticsearch
Packages: react-search-ui

Contributor guide

Open the contributing guide

Research direction

Start by tracing the react-search-ui component and the addFilter method for disjunctive facets, using the Elasticsearch case described in the issue. Confirm how the facet list is limited behind + More, then verify that programmatically selected values remain visible without expanding it.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, react, typescript
Domain
frontend, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.