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

Related issues

bealsao picture bealsao  路  16Comments

ntziolis picture ntziolis  路  13Comments

ncmadhan1989 picture ncmadhan1989  路  14Comments

derekesh picture derekesh  路  29Comments

NamrataSah9 picture NamrataSah9  路  17Comments