pnp / pnp/sp-dev-fx-controls-react

ModernTaxonomyPicker single selection doesn't "unfocus"

Open
#2,086 1 comment 0 reactions 0 assignees View on GitHub

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.23.0]

Expected / Desired Behavior / Question

When allowMultipleSelections = false, after choosing an option, the input field continues to have the thick focus border around the control. Since you cannot enter the box, you can't tab out or otherwise cause a blur event to cause the border to be removed.

I verified if you have allowMultipleSelections = true, after you choose 1 option, tabbing out or clicking out causes it to blur and remove the focus border.

The desired behavior is to have it trigger the blur even so the thick focus border is removed. As a bonus, it would be nice to expose the blur event just like we have the onChange event. This would help with integrating into other validation libraries.

Observed Behavior

See above

Steps to Reproduce

See above

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ModernTaxonomyPicker implementation and reproduce the issue with allowMultipleSelections set to false. Verify that selecting an option removes the focus border, and consider the requested blur event separately; the issue provides no file or test path, so locate the relevant control and its existing selection behavior first.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.