Skip to content
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

feat(modern taxonomy picker): ability to disallow selecting children #1279

Merged
merged 5 commits into from
Sep 7, 2022

Conversation

JakeStanger
Copy link
Contributor

Q A
Bug fix? [ ]
New feature? [x]
New sample? [ ]
Related issues?

What's in this Pull Request?

Adds new allowSelectingChildren prop, which is true by default. Setting to false means only the top-level terms appear in search results, and their tree nodes are not expandable. Respects anchorTermId.

This is useful in situations where you need people to drill down across multiple fields when paired with anchorTermId.

Also includes related docs update.

msftbot[bot] and others added 4 commits June 28, 2022 23:42
Adds new `allowSelectingChildren` prop, which is true by default. Setting to `false` means only the top-level terms appear in search results, and their tree nodes are not expandable. Respects `anchorTermId`.
@joelfmrodrigues joelfmrodrigues changed the base branch from master to dev August 21, 2022 22:01
@joelfmrodrigues
Copy link
Collaborator

@JakeStanger many thanks for the PR. Could you please resolve conflicts?
I have just updated the target branch from main to dev.

…children

# Conflicts:
#	docs/documentation/docs/controls/ModernTaxonomyPicker.md
#	src/controls/modernTaxonomyPicker/ModernTaxonomyPicker.tsx
@JakeStanger
Copy link
Contributor Author

Hey, sorry for the delay - disappeared on holiday & this ended up lost at the bottom of my pile. All resolved :)

@joelfmrodrigues joelfmrodrigues merged commit e37f4f8 into pnp:dev Sep 7, 2022
@joelfmrodrigues
Copy link
Collaborator

@JakeStanger many thanks for this, great new feature! Now merged and will be available on the beta version within a few minutes.

Just two small notes:
-in the future, please try to avoid changing existing code if you are only going to change formatting as this adds to the amount of code that we need to review :) Even if it's empty spaces or breaking the code into separate lines, we still need to carefully verify if something changed
-please also avoid updating existing code to generate the same result in a different way, unless it's significantly simpler. In this case, I am referring to the searchTermUrl changes. I personally like the changes you did, but the outcome seems to be exactly the same so ends up being just personal preference and the original code author probably had different preference and we should respect that :) Again, if it's something that will greatly simplify a complex block of code, it's welcome (hard to decide really 😆)

Thank you!

@joelfmrodrigues joelfmrodrigues added this to the 3.11.0 milestone Sep 7, 2022
@JakeStanger
Copy link
Contributor Author

Most of those changes came from refactoring as I was expecting to add more complexity but didn't need to, but noted for the future, cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants