feat: enhance document list navigation and sorting functionality (#23383)
This commit is contained in:
parent
a724f35672
commit
d8584dc03a
8 changed files with 966 additions and 28 deletions
|
|
@ -139,7 +139,12 @@ const DocumentDetail: FC<Props> = ({ datasetId, documentId }) => {
|
|||
})
|
||||
|
||||
const backToPrev = () => {
|
||||
router.push(`/datasets/${datasetId}/documents`)
|
||||
// Preserve pagination and filter states when navigating back
|
||||
const searchParams = new URLSearchParams(window.location.search)
|
||||
const queryString = searchParams.toString()
|
||||
const separator = queryString ? '?' : ''
|
||||
const backPath = `/datasets/${datasetId}/documents${separator}${queryString}`
|
||||
router.push(backPath)
|
||||
}
|
||||
|
||||
const isDetailLoading = !documentDetail && !error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue