pnp / sp-dev-fx-controls-react

Reusable React controls for SPFx solutions
https://pnp.github.io/sp-dev-fx-controls-react/
MIT License
380 stars 379 forks source link

iconPicker no "onClickIconPicker" property in ref object available to use #1618

Open livain18 opened 11 months ago

livain18 commented 11 months ago

Category

[ ] Enhancement

[ x ] Bug

[ ] Question

Version

Please specify what version of the library you are using: [ 3.15.0 ]

Expected / Desired Behavior / Question

It is not currently possible to use an "onClickIconPicker" property on IconPicker component neither is it available as a property used as a ref from IconPicker. In my situation I need a sortlike method to be able to open the iconPicker with the "Enter" button and it is only possible to open it with "Space" button atm. i need something like

iconPickerElement?.addEventListener("keydown", (ev) => { if ((ev as KeyboardEvent).code === "Enter") { iconPickerRef.current.onClickIconPicker(); } });)

--> see iconPickerRef.current.onClickIconPicker();

Observed Behavior

No onClickIconPicker property is present in the ref object from the iconPicker. I need to be able to use onClickIconPicker outside of the component.

Thanks!

ghost commented 11 months ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.