mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-01-15 08:23:36 -03:00
Update view all plugins behavior
This commit is contained in:
@@ -50,6 +50,11 @@ export const Component = () => {
|
||||
setSearchQuery(event.target.value);
|
||||
}, []);
|
||||
|
||||
const onViewAll = useCallback(() => {
|
||||
if (category) setCategory(undefined);
|
||||
else setStatus(PluginStatusOption.All);
|
||||
}, [ category ]);
|
||||
|
||||
const filteredPlugins = useMemo(() => {
|
||||
if (pluginDetails) {
|
||||
let filtered = pluginDetails;
|
||||
@@ -207,12 +212,8 @@ export const Component = () => {
|
||||
</Grid>
|
||||
) : (
|
||||
<NoPluginResults
|
||||
isFiltered={!!category}
|
||||
// eslint-disable-next-line react/jsx-no-bind
|
||||
onViewAll={() => {
|
||||
setCategory(undefined);
|
||||
setStatus(PluginStatusOption.All);
|
||||
}}
|
||||
isFiltered={!!category || status !== PluginStatusOption.All}
|
||||
onViewAll={onViewAll}
|
||||
query={searchQuery}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user