primereact icon indicating copy to clipboard operation
primereact copied to clipboard

DropDown component/ onBlur and onFocus triggered twice

Open m-ivanova opened this issue 6 years ago • 5 comments

DropDown component- onBlur and onFocus triggered twice

I'm submitting a ... (check one with "x")

[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Current behavior

When using the latest version of prime react, I have noticed that the events onFocus and onBlur in the DropDown component are triggered twice. Expected behavior

The events to be triggered only once Minimal reproduction of the problem with instructions

  • React version: 16.8.5

  • PrimeReact version: 4.2.0

All browsers

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

m-ivanova avatar Apr 29 '20 11:04 m-ivanova

Hi,

Could you please attach your Dropdown tag? Is it editable? Also, What steps do I have to follow to reproduce it?

Best Regards,

mertsincan avatar Apr 29 '20 18:04 mertsincan

Hello, This is the tag
<Dropdown id="statusInLineEdit" value={this.state.rowToBeEdited ? this.state.rowToBeEdited.status : props.rowData.status} options={statusOptions} onChange={(e: any) => this.onPurchaseOrderEditorValueChange(props, e.target.value)} filter={true} onBlur={e => this.onInlineBlur(e, 'statusInLineEdit')} />

Yes, I use it as inline edit in a datatable component. Steps to reproduce: If you try to console.log something in on Blur, you will notice that the event gets triggered twice.

m-ivanova avatar Apr 30 '20 07:04 m-ivanova

@m-ivanova is this still an issue in 8.0.0?

melloware avatar Apr 16 '22 13:04 melloware

@m-ivanova is this still an issue in 8.0.0?

No, it works. :)

m-ivanova avatar Apr 18 '22 11:04 m-ivanova

Thanks for reporting back!

melloware avatar Apr 18 '22 12:04 melloware