mirror of
https://github.com/langgenius/dify.git
synced 2026-08-28 19:16:51 +08:00
fix apps category history behavior
This commit is contained in:
parent
073d0aa2d0
commit
9f3a148732
@ -13,7 +13,7 @@ import dynamic from 'next/dynamic'
|
|||||||
import {
|
import {
|
||||||
useRouter,
|
useRouter,
|
||||||
} from 'next/navigation'
|
} from 'next/navigation'
|
||||||
import { useQueryState } from 'nuqs'
|
import { parseAsString, useQueryState } from 'nuqs'
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Input from '@/app/components/base/input'
|
import Input from '@/app/components/base/input'
|
||||||
@ -47,9 +47,10 @@ const List = () => {
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { isCurrentWorkspaceEditor, isCurrentWorkspaceDatasetOperator } = useAppContext()
|
const { isCurrentWorkspaceEditor, isCurrentWorkspaceDatasetOperator } = useAppContext()
|
||||||
const showTagManagementModal = useTagStore(s => s.showTagManagementModal)
|
const showTagManagementModal = useTagStore(s => s.showTagManagementModal)
|
||||||
const [activeTab, setActiveTab] = useQueryState('category', {
|
const [activeTab, setActiveTab] = useQueryState(
|
||||||
defaultValue: 'all',
|
'category',
|
||||||
})
|
parseAsString.withDefault('all').withOptions({ history: 'push' }),
|
||||||
|
)
|
||||||
const { query: { tagIDs = [], keywords = '', isCreatedByMe: queryIsCreatedByMe = false }, setQuery } = useAppsQueryState()
|
const { query: { tagIDs = [], keywords = '', isCreatedByMe: queryIsCreatedByMe = false }, setQuery } = useAppsQueryState()
|
||||||
const [isCreatedByMe, setIsCreatedByMe] = useState(queryIsCreatedByMe)
|
const [isCreatedByMe, setIsCreatedByMe] = useState(queryIsCreatedByMe)
|
||||||
const [tagFilterValue, setTagFilterValue] = useState<string[]>(tagIDs)
|
const [tagFilterValue, setTagFilterValue] = useState<string[]>(tagIDs)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user