Input: OnChange event not triggered after clearing the state
Describe the bug Input is not calling on change as expected. Read the steps and watch the gif for better understanding:
Isolated Example Forgive me for not using the sanbox. It is currently being blocked by my firewall.
import React, { useState } from 'react';
import { Button, Input } from '@ui5/webcomponents-react'
const App = () => {
const [value, setState] = useState('');
const handleChange = (e) => {
setState(e.target.value);
}
return (
<>
<Button onClick={() => setState('')}>Clear</Button>
<Input value={value} onChange={handleChange} />
<p>{value}</p>
</>
);
};
export default App;
To Reproduce Steps to reproduce the behavior:
- Have an input field with some value eg. '[email protected]' and copy to your clipboard
- Programatically clear the value of the state of that given input field
- Paste the value on your clipboard to the field again
- See error (value is not updated, onchange is not triggered)
Expected behavior After clearing and pasting the old value I expect the onChange to be triggered again
Screenshots

UI5 Web Components for React Information
@ui5/webcomponents version: 1.6.0
@ui5/webcomponents-react version: 0.27.1
Operating System: MacOS
Browser: Chrome (Version 103.0.5060.134 (Official Build) (x86_64))
Thanks for reporting! I'll forward this issue to our UI5 Web Components Colleagues as the affected component is developed in their repository.
Should be the same issue as described here.
Hello Team @SAP/ui5-webcomponents-topic-rl
Issue introduced by latest refactoring of change event. Example: https://jsbin.com/pobagobovo/1/edit?html,console,output
Regards, Martin