I am currently developing a web part that displays files in a document library in a table ordered by File name,

If this were a standard list I could use pnp js to OrderBy 'Title' but as the 'Title' field is null by default this is not possible without getting the full library contents that I can see.

I am currently using the list pnp js command to get items for the list associated with the library, then for each item using the .expand 'File' command to get the file name, this is fine for small libraries but will not scale very well.

Has anyone tried anything similar or have any other suggestions?

  • can you post some code snippet that you are using ? – Gautam Sheth Aug 12 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.