Skip to content

[ui5-input]: Clear button does not always update state properly #11836

@codefactor

Description

@codefactor

Bug Description

We use the <ui5-input> tag to render a combobox like UI which fetches a list of suggestions from the server using the user's input text. If the user clicks the drop down slim arrow down button on right side, this should trigger a no user input search and add suggestions. The user selects an item, then clears the selection, and then selects the same item again. There is a state inconsistency experienced where no change event is fired - and the user appears to have selected an item but the state does not reflect that.

I am unable to create a stackblitz for ui5-webcomponents directly - something is wrong with the stack blitz it shows loading forever. I was able to reproduce it with the stackblitz from ui5-webcomponents-react project. I presume that this a webcomponent issue and not a react issue.

There may be a way to resolve the problem, but it is not clear to me why a change event is not fired in this case. I believe the usage I have of the components is acceptable and should work as is.

Affected Component

ui5-input

Expected Behaviour

Selecting the same item after clicking the clear button should fire the change event.

Isolated Example

https://stackblitz.com/edit/github-h13jgzhb?file=src%2FApp.tsx

Steps to Reproduce

  1. Click the drop down inside the Input.
  2. Select any Option
  3. Click the X button to clear the selection
  4. Click the drop down menu again, select the same option as before.

Log Output, Stack Trace or Screenshots

No response

Priority

None

UI5 Web Components Version

2.11.0

Browser

Chrome

Operating System

Mac OS

Additional Context

No response

Organization

SuccessFactors

Declaration

  • I’m not disclosing any internal or sensitive information.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions