Skip to content

TaxonomyPicker allows selecting terms with Available for Tagging set to false via search #2110

Open

Description

@marksyantovich

Category

[x] Bug

Version

Version of the library: [@pnp/spfx-controls-react 4.0.0-beta.6059091]

The same behavior was also reproduced with [@pnp/spfx-controls-react 3.24.0].

SPFx version: 1.17.3

Expected / Desired Behavior / Question

Terms where Available for Tagging is set to false should not be selectable in the TaxonomyPicker.

In the term tree, these terms are shown as disabled and cannot be selected. They should remain visible in the tree because their child terms may still be available for tagging and need to remain selectable. The same restriction should be applied when searching or typing in the picker field: disabled terms should either not appear in search suggestions or should appear as disabled and not be selectable.

Observed Behavior

Terms where Available for Tagging is set to false are disabled in the taxonomy tree and cannot be selected from the tree.

Image

However, the same terms can still be found by typing in the picker field/search and can be selected from the search suggestions. After selection, they are added to the picker value as selected terms.

Image Image

Example term set:

  • AA has Available for Tagging set to false
  • B has Available for Tagging set to false

Both AA and B cannot be selected from the tree, but they can be searched and selected through the picker input.

The goal is not to hide AA and B from the tree, because their child terms such as AAA, AAB, BA, and BB still need to be reachable and selectable when they are available for tagging.

Steps to Reproduce

  1. Create or use a term set with at least the following terms:
    • A
    • AA
    • AAA
    • AAB
    • AB
    • ABA
    • ABB
    • B
    • BA
    • BB
  2. Set Available for Tagging to false for AA and B.
  3. Add a TaxonomyPicker to an SPFx web part.
  4. Configure the picker to use the term set.
  5. Open the picker panel and confirm that AA and B are disabled in the tree and cannot be selected there.
  6. Type AA or B in the picker input/search field.
  7. Select the matching term from the search suggestions.
  8. Observe that the disabled term is added to the selected terms.

Example picker configuration:

<TaxonomyPicker
  allowMultipleSelections={true}
  context={context}
  isTermSetSelectable={false}
  label="Test term set"
  onChange={onTaxonomyPickerChange}
  panelTitle="Test Terms"
  termsetNameOrID="{termsetID}"
/>

Thanks!

Activity

  1. github-actions commented on May 12, 2026

    @github-actions

    Thank you for submitting your first issue to this project.

  2. Nathaire commented on Jun 29, 2026

    @Nathaire

    Any news to that issue ? We still have the issue on our side. :-)

  3. Nathaire commented on Sep 8, 2026

    @Nathaire

    I know this is free open source project and devs are working freely on this one, but just asking again to see if project is still active? @AJIXuMuK, @joaojmendes maybe ?

  4. joelfmrodrigues commented on Sep 8, 2026

    @joelfmrodrigues
    Collaborator

    @Nathaire yes, the project is still active and we welcome PRs 😊
    I have marked the issue with the help wanted label, but please let me know if you would like to try to fix it and I can assign to you so others are aware

  5. ashokghoghari commented on Nov 19, 2026

    @ashokghoghari

    I'd like to take this one. The search box asks the suggestion service for unavailable terms (isIncludeUnavailable) unless hideTagsNotAvailableForTagging is set, while the tree always disables them. I have a fix that always excludes them from suggestions (the tree is unchanged, so their child terms stay selectable), with unit tests. I'll open a PR against dev.

  6. joelfmrodrigues commented on Nov 19, 2026

    @joelfmrodrigues
    Collaborator

    @ashokghoghari many thanks!

  7. Nathaire commented on Nov 19, 2026

    @Nathaire

    Thanks a lot @ashokghoghari

  8. added a commit that references this issue on Nov 19, 2026
    0779960
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions