pnp / pnp/sp-dev-fx-controls-react
[TaxonomyPicker] Enhancements
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 433
- Forks
- 418
- Avg merge
- 5d 6m
- Merged PRs (30d)
- 19
Description
Category
[✅] Enhancement
[ ] Bug
[ ] Question
Version
Please specify what version of the library you are using: 3.20.0
Expected / Desired Behavior / Question
- The first problem is that in single selection mode (
allowMultipleSelections: false) the control doesn't lose focus if you select a term using inline search and not a panel, which is demonstrated below:
- The second issue (an enhancement, actually) is a way of selecting a term in the panel. If the control is in a single selection mode (
allowMultipleSelections: false), then you have to click two times to select a term - one to select it and second time to click "Save". But since you cannot select more than one in this case, after selecting the first term we can simply close the panel.
This is how it works now:
The suggested change (we don't have any Save/Cancel buttons):
In order not to break existing functionality the idea is to introduce a new property, say simpleSelectionInSingleMode which is false by default. When true (and allowMultipleSelections: false), then the above behaviour will be activated.
If you approve, I will make a PR.
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
Start at the TaxonomyPicker implementation and trace single-selection behavior through inline search and panel selection. Check how focus, Save/Cancel controls, and allowMultipleSelections are handled, then verify that the opt-in simpleSelectionInSingleMode behavior works without changing the default and that focus is released after inline selection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100