Repository navigation
TaxonomyPicker: don't suggest terms that are not available for tagging (fixes #2110) - #2200
Open
ashokghoghari wants to merge 1 commit into
Open
ashokghoghari wants to merge 1 commit into
ashokghoghari wants to merge 1 commit into
Conversation
…agging Terms with "Available for Tagging" set to false are disabled in the term tree, but the search suggestions requested them from the suggestion service unless hideTagsNotAvailableForTagging was set, so they could still be selected by typing in the picker. Always request suggestions with isIncludeUnavailable: false. The tree is unchanged, so these terms stay visible there and their child terms remain selectable. Fixes pnp#2110
ashokghoghari
force-pushed
the
fix/2110-taxonomy-search-unavailable-terms
branch
from
November 19, 2026 09:57
9620e48 to
0779960
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's in this Pull Request?
TaxonomyPicker: terms with Available for Tagging set tofalseare disabled in the term tree, but they were still offered as search suggestions when typing in the picker, and could be selected from there.Cause:
SPTermStorePickerService.searchTermsByTermSetcalled the suggestion service withisIncludeUnavailable: this.props.hideTagsNotAvailableForTagging !== true, so unavailable terms were included in suggestions unlesshideTagsNotAvailableForTaggingwas set.Fix: always request suggestions with
isIncludeUnavailable: false. These terms can never be selected, so they should not be suggested either. The tree is unchanged: the terms stay visible there (greyed out) and their child terms remain selectable, as requested in the issue.hideDeprecatedTagshandling is unchanged.Tests: added
tests/services/SPTermStorePickerService.test.ts(3 tests), which checks the suggestion request body. The main test fails before the change and passes after.heft test --clean --production: builds cleanly, 96 tests pass.npx jest(tests/suite): the new tests pass. The 7 failing suites and theSPService › getListItems "test filter"failure are the same on unmodifieddev.I have not tested this against a live tenant.