Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
46dcaad1
Commit
46dcaad1
authored
Jul 28, 2023
by
JzoNg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: refresh list after new segment added
parent
4250708a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
index.tsx
.../components/datasets/documents/detail/completed/index.tsx
+10
-2
No files found.
web/app/components/datasets/documents/detail/completed/index.tsx
View file @
46dcaad1
...
...
@@ -219,7 +219,7 @@ const Completed: FC<ICompletedProps> = ({ showNewSegmentModal, onNewSegmentModal
documentId
,
params
:
omitBy
({
last_id
:
!
needLastId
?
undefined
:
finalLastId
,
limit
:
9
,
limit
:
12
,
keyword
:
searchValue
,
enabled
:
selectedStatus
===
'all'
?
'all'
:
!!
selectedStatus
,
},
isNil
)
as
SegmentsQuery
,
...
...
@@ -233,6 +233,14 @@ const Completed: FC<ICompletedProps> = ({ showNewSegmentModal, onNewSegmentModal
setLoading
(
false
)
}
const
resetList
=
()
=>
{
setLastSegmentsRes
(
undefined
)
setAllSegments
([])
setLoading
(
false
)
setTotal
(
undefined
)
getSegments
(
false
)
}
useEffect
(()
=>
{
if
(
lastSegmentsRes
!==
undefined
)
getSegments
(
false
)
...
...
@@ -336,7 +344,7 @@ const Completed: FC<ICompletedProps> = ({ showNewSegmentModal, onNewSegmentModal
isShow=
{
showNewSegmentModal
}
docForm=
{
docForm
}
onCancel=
{
()
=>
onNewSegmentModalChange
(
false
)
}
onSave=
{
()
=>
getSegments
(
false
)
}
onSave=
{
resetList
}
/>
</>
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment