react-datalist-input icon indicating copy to clipboard operation
react-datalist-input copied to clipboard

Propagate value of selected item as onChange event on input

Open mazeForGit opened this issue 7 months ago • 3 comments

Problem I can get changes on input via onChange event and changes on item-selection via onSelect. But on item-selection the input.value is changed as well. Event onChange is therefore a combination of input.value change from user input as well as item selection.

Solution onSelect should trigger onChange with new value as well

used environment "bootstrap": "^5.3.1", "react-bootstrap": "^2.8.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-datalist-input": "^3.2.1"

mazeForGit avatar Nov 17 '23 08:11 mazeForGit