Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
26e320b0
authored
Apr 29, 2025
by
Finley Ge
Committed by
GitHub
Apr 29, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: app/dataset list peredit bug (#4714)
parent
14ad6aef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
projects/app/src/pageComponents/dashboard/apps/List.tsx
+8
-5
projects/app/src/pageComponents/dataset/list/List.tsx
+5
-5
No files found.
projects/app/src/pageComponents/dashboard/apps/List.tsx
View file @
26e320b0
...
...
@@ -58,11 +58,14 @@ const ListItem = () => {
const
[
editedApp
,
setEditedApp
]
=
useState
<
EditResourceInfoFormType
>
();
const
[
editHttpPlugin
,
setEditHttpPlugin
]
=
useState
<
EditHttpPluginProps
>
();
const
[
editPerAppI
ndex
,
setEditPerAppIndex
]
=
useState
<
number
>
();
const
[
editPerAppI
d
,
setEditPerAppId
]
=
useState
<
string
>
();
const
editPerApp
=
useMemo
(
()
=>
(
editPerAppIndex
!==
undefined
?
myApps
[
editPerAppIndex
]
:
undefined
),
[
editPerAppIndex
,
myApps
]
()
=>
editPerAppId
!==
undefined
?
myApps
.
find
((
item
)
=>
String
(
item
.
_id
)
===
String
(
editPerAppId
))
:
undefined
,
[
editPerAppId
,
myApps
]
);
const
parentApp
=
useMemo
(()
=>
myApps
.
find
((
item
)
=>
item
.
_id
===
parentId
),
[
parentId
,
myApps
]);
...
...
@@ -340,7 +343,7 @@ const ListItem = () => {
icon
:
'key'
,
type
:
'grayBg'
as
MenuItemType
,
label
:
t
(
'common:permission.Permission'
),
onClick
:
()
=>
setEditPerAppI
ndex
(
index
)
onClick
:
()
=>
setEditPerAppI
d
(
app
.
_id
)
}
]
:
[])
...
...
@@ -452,7 +455,7 @@ const ListItem = () => {
}),
refreshDeps
:
[
editPerApp
.
inheritPermission
]
}
}
onClose=
{
()
=>
setEditPerAppI
ndex
(
undefined
)
}
onClose=
{
()
=>
setEditPerAppI
d
(
undefined
)
}
/
>
)
}
{
!!
editHttpPlugin
&&
(
...
...
projects/app/src/pageComponents/dataset/list/List.tsx
View file @
26e320b0
...
...
@@ -51,7 +51,7 @@ function List() {
folderDetail
,
setSearchKey
}
=
useContextSelector
(
DatasetsContext
,
(
v
)
=>
v
);
const
[
editPerDatasetI
ndex
,
setEditPerDatasetIndex
]
=
useState
<
number
>
();
const
[
editPerDatasetI
d
,
setEditPerDatasetId
]
=
useState
<
string
>
();
const
router
=
useRouter
();
const
{
parentId
=
null
}
=
router
.
query
as
{
parentId
?:
string
|
null
};
const
parentDataset
=
useMemo
(
...
...
@@ -82,8 +82,8 @@ function List() {
});
const
editPerDataset
=
useMemo
(
()
=>
(
editPerDatasetIndex
!==
undefined
?
myDatasets
[
editPerDatasetIndex
]
:
undefined
),
[
editPerDatasetI
ndex
,
myDatasets
]
()
=>
myDatasets
.
find
((
item
)
=>
String
(
item
.
_id
)
===
String
(
editPerDatasetId
)
),
[
editPerDatasetI
d
,
myDatasets
]
);
const
{
mutate
:
exportDataset
}
=
useRequest
({
...
...
@@ -346,7 +346,7 @@ function List() {
{
icon
:
'key'
,
label
:
t
(
'common:permission.Permission'
),
onClick
:
()
=>
setEditPerDatasetI
ndex
(
index
)
onClick
:
()
=>
setEditPerDatasetI
d
(
dataset
.
_id
)
}
]
:
[])
...
...
@@ -449,7 +449,7 @@ function List() {
}),
refreshDeps
:
[
editPerDataset
.
_id
,
editPerDataset
.
inheritPermission
]
}
}
onClose=
{
()
=>
setEditPerDatasetI
ndex
(
undefined
)
}
onClose=
{
()
=>
setEditPerDatasetI
d
(
undefined
)
}
/>
)
}
<
ConfirmModal
/>
...
...
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