feat(pickers): a list that failed to load offers Retry
A picker whose options failed to load said so, but the only way back was closing its dialog. Combobox takes `onRetry`: a Retry beside the message for the pointer, and Enter in the field for the keyboard (the panel is a listbox, which may hold options only, so the alert names Enter for assistive tech). Every caller with an error state passes its query's refetch: both user pickers, the channel picker and the two Plex pickers.
This commit is contained in:
@@ -373,6 +373,7 @@ function PlaylistPicker() {
|
||||
placeholder={t("plex.playlist.pickerPlaceholder")}
|
||||
loading={playlistsQ.isLoading}
|
||||
error={playlistsQ.isError && !playlistsQ.data ? t("common.loadError") : undefined}
|
||||
onRetry={() => void playlistsQ.refetch()}
|
||||
emptyText={t("plex.playlist.none")}
|
||||
renderOption={(o) =>
|
||||
o.value === CREATE_PLAYLIST ? (
|
||||
@@ -457,6 +458,7 @@ function CollectionPicker({
|
||||
onOpenChange={setOpen}
|
||||
loading={q.isFetching}
|
||||
error={q.isError ? t("common.loadError") : undefined}
|
||||
onRetry={() => void q.refetch()}
|
||||
placeholder={t("plex.filter.collectionSearch")}
|
||||
emptyText={t("plex.filter.collectionEmpty")}
|
||||
onChange={(next) => {
|
||||
|
||||
Reference in New Issue
Block a user