pnp / pnp/sp-dev-fx-controls-react
iconPicker no "onClickIconPicker" property in ref object available to use
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 433
- Forks
- 418
- Avg merge
- 5d 6m
- Merged PRs (30d)
- 19
Description
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!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue points to the IconPicker component and its ref object; start by locating the ref API and the current Space-key activation path. Check how an externally callable click handler could expose the existing picker-opening behavior, then verify that Enter triggers the same behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100