mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
refactor(console): clear search input on clear search results (#4715)
This commit is contained in:
parent
6b01e9c88e
commit
19aa36aac2
1 changed files with 9 additions and 1 deletions
|
@ -52,7 +52,15 @@ function Search({
|
|||
/>
|
||||
<Button title="general.search" onClick={handleClick} />
|
||||
{isClearable && (
|
||||
<Button size="small" type="text" title="general.clear_result" onClick={onClearSearch} />
|
||||
<Button
|
||||
size="small"
|
||||
type="text"
|
||||
title="general.clear_result"
|
||||
onClick={() => {
|
||||
setInputValue('');
|
||||
onClearSearch?.();
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue