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

List Picker - adds ContentTypes/Name to query #521

Merged
merged 1 commit into from
Feb 12, 2023

Conversation

c-eiser13
Copy link
Contributor

Q A
Bug fix? [ ]
New feature? [ x]
New sample? [ ]
Related issues? fixes #X, partially #Y, mentioned in #Z

What's in this Pull Request?

I have had several cases using the List Picker control where I wanted to filter on content type name, but can only filter directly on ID and I do not have the full ID. Since the plumbing is in place to provide part of the ID, which I will always have (0x0100, 0x0101, etc), simply added the ContentTypes/Name prop to the queryUrl in the getLibs() function when a contentTypeId prop is provided. This way, I can provide 0x0100 for Content Type ID, then use
onListsRetrieved to further filter the lists by the content type name. If this is approved, I can add a note to the docs as well in case others have a similar need.

image

@AJIXuMuK AJIXuMuK merged commit 82be422 into pnp:dev Feb 12, 2023
@AJIXuMuK
Copy link
Collaborator

Thank you @c-eiser13 for the improvement!

@AJIXuMuK AJIXuMuK added this to the 3.12.0 milestone Feb 12, 2023
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.

2 participants