feat: SearchBar clear button support i18n

Signed-off-by: mario ma <mario.ma.node@gmail.com>
This commit is contained in:
mario ma
2025-06-04 16:09:44 +08:00
parent c0123c0433
commit 869fa46bd2
4 changed files with 9 additions and 2 deletions
@@ -154,7 +154,7 @@ export const SearchBarBase = forwardRef((props: SearchBarBaseProps, ref) => {
const clearButtonEndAdornment = (
<InputAdornment position="end">
<Button
aria-label="Clear"
aria-label={t('searchBar.clearButtonTitle')}
size="small"
onClick={handleClear}
onKeyDown={event => {
@@ -164,7 +164,7 @@ export const SearchBarBase = forwardRef((props: SearchBarBaseProps, ref) => {
}
}}
>
Clear
{t('searchBar.clearButtonTitle')}
</Button>
</InputAdornment>
);
+1
View File
@@ -25,6 +25,7 @@ export const searchReactTranslationRef = createTranslationRef({
searchBar: {
title: 'Search',
placeholder: 'Search in {{org}}',
clearButtonTitle: 'Clear',
},
searchFilter: {
allOptionTitle: 'All',