📎 fix: Keep SharePoint Picker Selections While Navigating (#15389)

The picker never set `selection.enablePersistence`, so it dropped the current
selection every time the user opened another folder or switched pivot. A selection
could only ever be assembled from a single location — pick three files, open another
folder, and the three are gone.

One option on the picker configuration; no change to what LibreChat does with the
result.

Fixes the selection half of #15237. Folder selection — the other half — is a new
capability rather than a fix, and is parked on `feat/sharepoint-folder-selection`.
This commit is contained in:
Danny Avila 2026-09-01 12:59:50 -04:00 • committed by GitHub
parent 537ddba6bb
commit d83958d3b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -285,6 +285,10 @@ export default function useSharePointPicker({
},
selection: {
mode: 'multiple',
/** Without this the picker drops the current selection every time the user
* opens another folder or switches pivot, so a selection can only ever be
* assembled from one location. */
enablePersistence: true,
maximumCount: maxSelectionCount,
},
title: localize('com_files_sharepoint_picker_title'),