mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-08-02 14:52:15 +00:00
Reset category filter on type change in VODsPage component
This commit is contained in:
parent
5f00027425
commit
92b4e9e348
1 changed files with 7 additions and 1 deletions
|
|
@ -373,6 +373,12 @@ const VODsPage = () => {
|
|||
setPage(1);
|
||||
};
|
||||
|
||||
// When type changes, reset category to all
|
||||
const handleTypeChange = (value) => {
|
||||
setFilters({ type: value, category: '' });
|
||||
setPage(1);
|
||||
};
|
||||
|
||||
const categoryOptions = [
|
||||
{ value: '', label: 'All Categories' },
|
||||
...Object.values(categories)
|
||||
|
|
@ -400,7 +406,7 @@ const VODsPage = () => {
|
|||
<Group spacing="md" align="end">
|
||||
<SegmentedControl
|
||||
value={filters.type}
|
||||
onChange={(value) => setFilters({ type: value })}
|
||||
onChange={handleTypeChange}
|
||||
data={[
|
||||
{ label: 'All', value: 'all' },
|
||||
{ label: 'Movies', value: 'movies' },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue