Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
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
Commit
6ebcb8f7
authored
Feb 12, 2026
by
Seefs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: normalize search pagination params to avoid [object Object]
parent
8dbc5641
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
web/src/components/table/tokens/TokensFilters.jsx
+1
-1
web/src/hooks/tokens/useTokensData.jsx
+5
-1
No files found.
web/src/components/table/tokens/TokensFilters.jsx
View file @
6ebcb8f7
...
@@ -47,7 +47,7 @@ const TokensFilters = ({
...
@@ -47,7 +47,7 @@ const TokensFilters = ({
setFormApi
(
api
);
setFormApi
(
api
);
formApiRef
.
current
=
api
;
formApiRef
.
current
=
api
;
}
}
}
}
onSubmit=
{
searchTokens
}
onSubmit=
{
()
=>
searchTokens
(
1
)
}
allowEmpty=
{
true
}
allowEmpty=
{
true
}
autoComplete=
'off'
autoComplete=
'off'
layout=
'horizontal'
layout=
'horizontal'
...
...
web/src/hooks/tokens/useTokensData.jsx
View file @
6ebcb8f7
...
@@ -191,6 +191,10 @@ export const useTokensData = (openFluentNotification) => {
...
@@ -191,6 +191,10 @@ export const useTokensData = (openFluentNotification) => {
// Search tokens function
// Search tokens function
const
searchTokens
=
async
(
page
=
1
,
size
=
pageSize
)
=>
{
const
searchTokens
=
async
(
page
=
1
,
size
=
pageSize
)
=>
{
const
normalizedPage
=
Number
.
isInteger
(
page
)
&&
page
>
0
?
page
:
1
;
const
normalizedSize
=
Number
.
isInteger
(
size
)
&&
size
>
0
?
size
:
pageSize
;
const
{
searchKeyword
,
searchToken
}
=
getFormValues
();
const
{
searchKeyword
,
searchToken
}
=
getFormValues
();
if
(
searchKeyword
===
''
&&
searchToken
===
''
)
{
if
(
searchKeyword
===
''
&&
searchToken
===
''
)
{
setSearchMode
(
false
);
setSearchMode
(
false
);
...
@@ -199,7 +203,7 @@ export const useTokensData = (openFluentNotification) => {
...
@@ -199,7 +203,7 @@ export const useTokensData = (openFluentNotification) => {
}
}
setSearching
(
true
);
setSearching
(
true
);
const
res
=
await
API
.
get
(
const
res
=
await
API
.
get
(
`/api/token/search?keyword=
${
encodeURIComponent
(
searchKeyword
)}
&token=
${
encodeURIComponent
(
searchToken
)}
&p=
${
page
}
&size=
${
s
ize
}
`
,
`/api/token/search?keyword=
${
encodeURIComponent
(
searchKeyword
)}
&token=
${
encodeURIComponent
(
searchToken
)}
&p=
${
normalizedPage
}
&size=
${
normalizedS
ize
}
`
,
);
);
const
{
success
,
message
,
data
}
=
res
.
data
;
const
{
success
,
message
,
data
}
=
res
.
data
;
if
(
success
)
{
if
(
success
)
{
...
...
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