0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-27 21:39:16 -05:00

fix(console): user management search result (#1130)

This commit is contained in:
Xiao Yijun 2022-06-16 13:33:39 +08:00 committed by GitHub
parent 8d27adce39
commit 3a814a6746
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
import { User } from '@logto/schemas';
import { conditionalString } from '@silverhand/essentials';
import { conditional, conditionalString } from '@silverhand/essentials';
import classNames from 'classnames';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
@ -147,7 +147,7 @@ const Users = () => {
pageCount={Math.ceil(totalCount / pageSize)}
pageIndex={pageIndex}
onChange={(page) => {
setQuery({ page: String(page) });
setQuery({ page: String(page), ...conditional(keyword && { search: keyword }) });
}}
/>
)}