mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Fix "Invalid page" error when filtering empty channels
Reset pagination to page 1 when toggling "Only Empty Channels" filter to prevent requesting non-existent pages after filtering reduces results. Fixes #864
This commit is contained in:
parent
8521df94ad
commit
eb97333d0f
2 changed files with 5 additions and 0 deletions
|
|
@ -1413,6 +1413,8 @@ const ChannelsTable = ({ onReady }) => {
|
|||
setShowDisabled={setShowDisabled}
|
||||
showOnlyStreamlessChannels={showOnlyStreamlessChannels}
|
||||
setShowOnlyStreamlessChannels={setShowOnlyStreamlessChannels}
|
||||
pagination={pagination}
|
||||
setPagination={setPagination}
|
||||
/>
|
||||
|
||||
{/* Table or ghost empty state inside Paper */}
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ const ChannelTableHeader = ({
|
|||
setShowDisabled,
|
||||
showOnlyStreamlessChannels,
|
||||
setShowOnlyStreamlessChannels,
|
||||
pagination,
|
||||
setPagination,
|
||||
}) => {
|
||||
const theme = useMantineTheme();
|
||||
|
||||
|
|
@ -226,6 +228,7 @@ const ChannelTableHeader = ({
|
|||
};
|
||||
|
||||
const toggleShowOnlyStreamlessChannels = () => {
|
||||
setPagination({ ...pagination, pageIndex: 0 });
|
||||
setShowOnlyStreamlessChannels(!showOnlyStreamlessChannels);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue