-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TaxonomyPicker does not work correctly with anchorId #150
Comments
Can anyone answer this question? has already passed 20 days and silence... |
Can confirm this behavior. Would be nice if this will be fixed. |
I see this issue at my end and there is no update from authors since long time. I will look through source code myself and will find where is the issue! |
I tested the code in my node_modules directly. And it is working fine. To make it work I have changed at 2 places.
In TermPicker.js file:
SPTermStorePickerService.js file:
|
In Taxonomy control the typeahead search for filtering the terms not accepting the anchorId. I fixed it the code which accepts the anchorId and shows only terms from the specific anchorId terms instead of everything under the termset assigned. Bug pnp#150
Fix for accepting anchorId in typeahead search for showing only terms from anchorId given instead of showing all terms from termset. Bug pnp#150.
I have created cleaner implementation and tested in my local node_modules directly because I have different versions of spfx, node and other modules in my system. Can't run the actual project. If you like to know or use the implementation here is the information. Instead of changing the existing implementation which doesn't implemented to consider anchorId, I written a new method which handles that scenario. So, all the existing methods are not disturbed and new method will help us to find terms in a specific parent term id (anchor id) given. File: SPTermStorePickerService.js
To make use of this service method the caller file is and replace the line with below line.
This will take anchorId as the input and search for the filterText given and shows the right terms in type ahead search. Also, please note that the taxonomy service is saving the values in the given anchor id terms in sessionStorage. So, it won't make calls for each key press. Please let me know if you have any questions. I will submit the code to repository sometime this week. thanks |
Bug fix for pnp#150, Added new method to utilize the anchorId parameter to lookup the terms matching the keyword given under anchorId terms in type ahead search of taxonomy picker control. Method name added: searchTermsByTermId
Bug fix for SharePoint#150, Added new method to utilize the anchorId parameter to lookup the terms matching the keyword given under anchorId terms in type ahead search of taxonomy picker control. Method name added: searchTermsByTermId
Hi Praveen, I had this issue and your code worked like a charm. Can you do a Pull Request to the library? Let me know if you want help on that or if you want me to commit these changes. Thank you. |
The PR has just been merged and available in beta at the moment. This will be part of the |
thanks @DRamalho92. Somehow I didn't see the github messages in my inbox. Thanks @estruyf for accepting my changes! |
Thank you @praveenbattula for providing this fix but unfortunately we are now using the v3 of the pnp controls react and the issue is back. It means that the fix has not been merged with the new version :/ Kind regards |
Category
[ ] Enhancement
[x] Bug
[ ] Question
Version
Please specify what version of the library you are using: [ 1.9.0 ]
Observed Behavior
I use anchorId, to select terms from that level and below. In terms tree view it shows correct values. But auto complete ignores it and shows values from the whole tree…
Thanks!
The text was updated successfully, but these errors were encountered: