Pnpjs: Get all list titles in Site

Created on 4 Nov 2019  路  2Comments  路  Source: pnp/pnpjs

This shows how to get list items once given a list title (https://pnp.github.io/pnpjs/sp/docs/items/)

I want a PropertyPaneDropdown to allow the client-side to select between lists that exist on the site... is there anyway to do this?

sample answered question

Most helpful comment

Just get the lists queryable collection:

sp.web.lists.select('Id,Title').get().then(console.log)

All 2 comments

Just get the lists queryable collection:

sp.web.lists.select('Id,Title').get().then(console.log)

Closing this as answered. Thanks @koltyakov!

Was this page helpful?
0 / 5 - 0 ratings