Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: fix combo box clear icon #650

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

SarahBellaha
Copy link
Contributor

PR to address the issue of the clear icon being displayed even if the input is empty when the ComboBox is initialized with a default value.

@SarahBellaha SarahBellaha requested a review from a team as a code owner October 18, 2024 09:40
setInputValue('');
setSelectedOption(null);
onSelectSuggestion?.(undefined);
clearInput();
Copy link
Member

@Wadjetz Wadjetz Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clearInput function calls onSelectSuggestion, but I think we just want to reset the internal state of the component. This also causes a bug I detected when using it in SDCM: it’s called initially and, in my case, resets the value (after reloading the page) that was set previously.

Maybe we can create a new function that just resets the internal state without calling onSelectSuggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants