[BUGFIX] Allow to clear unit selector input when typing - #233
Open
adrianSepiol wants to merge 2 commits into
Open
[BUGFIX] Allow to clear unit selector input when typing#233adrianSepiol wants to merge 2 commits into
adrianSepiol wants to merge 2 commits into
Conversation
Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
adrianSepiol
force-pushed
the
bugfix/allow-to-clear-unit-selector
branch
from
August 18, 2026 10:06
a16c48f to
54079e8
Compare
…kage-lock.json Signed-off-by: Adrian Sepiół <a.sepiol@sap.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: perses/perses#4281
Description
Problem
The UnitSelector component used MUI Autocomplete's built-in clear button, which fires onChange with null when the user deletes all text from the input field. This caused the fallback logic to silently reset the unit to Decimal — even when the user was mid-edit and hadn't confirmed a new selection.
Fix
Behavior Changes
Previously: deleting all text from the input and clicking away would reset the unit to Decimal.
Now: deleting all text and clicking away leaves the current value unchanged. Only clicking the ✕ button explicitly resets the unit to Decimal.
Screenshots
Screen.Recording.2026-08-18.at.11.49.52.mov
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes
See e2e docs for more details. Common issues include: