ModernTaxonomyPicker can't find term when UI is in language not supported by term store #1573
Labels
status:fixed-next-drop
Issue will be fixed in upcoming release.
type:enhancement
New feature or enhancement of existing capability
Milestone
Category
[ ] Enhancement
[X] Bug
[ ] Question
Version
Please specify what version of the library you are using: [3.13.0]
Expected / Desired Behavior / Question
Using the ModernTaxonomyPicker when the SharePoint UI is in a language not supported by the term store (= not in termStoreInfo.languageTags), we should be able to search terms from the text field and find them in the default term store language.
Observed Behavior
Using the ModernTaxonomyPicker when the SharePoint UI is in a language not supported by the term store (= not in termStoreInfo.languageTags), while searching terms from the text field, no term can be found at all (the call to the termStore unofficial SP API is returning a 500 error code with the following details: "Specified argument was out of the range of valid values.\r\nParameter name: lcid").
Steps to Reproduce
Personal note
Looking at the code, I think it should not be hard to implement a fix.
After the first render, the language used by the component is set like this:
As we already have the
currentTermStoreInfo
, we could just check thecurrentUICultureName
against thetermStoreInfo.languageTags
array and usecurrentTermStoreInfo.defaultLanguageTag
if the current UI language is not supported (= not inside thetermStoreInfo.languageTags
array) by the term store.Thanks!
The text was updated successfully, but these errors were encountered: