Skip to content

Commit

Permalink
Fix primefaces#3179: Dropdown onBlur check for inputRef
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Aug 24, 2022
1 parent 0e02c07 commit b07840d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/lib/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,16 @@ export const Dropdown = React.memo(

if (props.onBlur) {
setTimeout(() => {
const currentValue = inputRef.current ? inputRef.current.value : '';
props.onBlur({
originalEvent: event.originalEvent,
value: inputRef.current.value,
value: currentValue,
stopPropagation: () => {},
preventDefault: () => {},
target: {
name: props.name,
id: props.id,
value: inputRef.current.value
value: currentValue
}
});
}, 200);
Expand Down

0 comments on commit b07840d

Please sign in to comment.