microsoft-search / pnp-modern-search

Home of PnP Modern Search solutions, helping you move from classic to modern SharePoint and beyond
https://microsoft-search.github.io/pnp-modern-search
Other
388 stars 341 forks source link

Default sort is not working inside Search Result web part #3937

Closed wobba closed 2 months ago

wobba commented 3 months ago

Discussed in https://github.com/microsoft-search/pnp-modern-search/discussions/3933

Originally posted by **mvcsharepointdev** August 23, 2024 I have this Search Result web part, and i defined the default sort to be for a specific column named "Ready Date" as follow:- ![image](https://github.com/user-attachments/assets/c3a1f358-33aa-40eb-b178-08f4f1140e1a) now when the page first loads the data will not be sorted using this column, as follow:- ![image](https://github.com/user-attachments/assets/08be088b-5d65-4289-bfbb-a7281235011a) if i click on the column header the sort will work correctly (Ascending and Descending), but why the data will not be sorted by "Ready Date" by default as specific in the settings? Here is the RefinableDate00 linked to the realted crawl property inside sharepoint search:- ![image](https://github.com/user-attachments/assets/47210dca-e10b-417f-a5f1-10e4ece71333) Thanks
kasperbolarsen commented 2 months ago

Default sorting seems to work fine in the Details List, List and Slider (v4.13.0) when default sort is a RefinableString ( Title )