[#419] removed duplicate adornment and ugly padding (#428)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2026-01-05 11:48:05 +01:00
committed by GitHub
parent 6839353f34
commit e59d878e6c
6 changed files with 45 additions and 36 deletions
@@ -273,6 +273,9 @@ export function PeopleSearch({
onChange(event, mapped);
}}
slotProps={customSlotProps}
// When render input is custom, the adornments should be handled by the custom component
forcePopupIcon={!customRenderInput}
disableClearable={!!customRenderInput}
renderInput={(params) =>
customRenderInput
? customRenderInput(params, query, setQuery)
+14 -16
View File
@@ -312,10 +312,22 @@ export default function SearchBar() {
</>
),
endAdornment: (
<>
{params.InputProps.endAdornment}
<InputAdornment position="end">
{(query || selectedContacts.length > 0) && (
<IconButton
aria-label={t("common.clear")}
onClick={() => {
setQuery("");
setSearch("");
handleFilterChange("keywords", "");
setSelectedContacts([]);
}}
>
<HighlightOffIcon />
</IconButton>
)}
<IconButton
aria-label={t("search.filter.filters")}
onMouseDown={(e) => e.preventDefault()}
onClick={() => {
setAnchorEl(containerRef.current);
@@ -336,20 +348,6 @@ export default function SearchBar() {
<TuneIcon />
</IconButton>
</InputAdornment>
{query && (
<InputAdornment position="end">
<IconButton
onClick={() => {
setQuery("");
setSearch("");
handleFilterChange("keywords", "");
}}
>
<HighlightOffIcon />
</IconButton>
</InputAdornment>
)}
</>
),
}}
/>
+3 -1
View File
@@ -39,6 +39,7 @@
},
"common": {
"cancel": "Cancel",
"clear": "Clear",
"ok": "Ok",
"link_copied": "Link copied!",
"import_file": "File",
@@ -57,7 +58,8 @@
"filter": {
"allCalendar": "All calendars",
"myCalendar": "My calendars",
"sharedCalendars": "Shared calendars"
"sharedCalendars": "Shared calendars",
"filters": "Filters"
},
"keywords": "Keywords*",
"keywordsPlaceholder": "Enter keywords",
+3 -1
View File
@@ -39,6 +39,7 @@
},
"common": {
"cancel": "Annuler",
"clear": "Effacer",
"ok": "OK",
"link_copied": "Lien copié !",
"import_file": "Fichier",
@@ -57,7 +58,8 @@
"filter": {
"allCalendar": "Tous les calendriers",
"myCalendar": "Mes calendriers",
"sharedCalendars": "Calendriers partagés"
"sharedCalendars": "Calendriers partagés",
"filters": "Filtres"
},
"keywords": "Mots-clés*",
"keywordsPlaceholder": "Saisissez des mots-clés",
+3 -1
View File
@@ -39,6 +39,7 @@
},
"common": {
"cancel": "Отмена",
"clear": "Очистить",
"ok": "Ок",
"link_copied": "Ссылка скопирована",
"import_file": "Файл",
@@ -57,7 +58,8 @@
"filter": {
"allCalendar": "Все календари",
"myCalendar": "Мои календари",
"sharedCalendars": "Общие календари"
"sharedCalendars": "Общие календари",
"filters": "Фильтры"
},
"keywords": "Ключевые слова*",
"keywordsPlaceholder": "Введите ключевые слова",
+3 -1
View File
@@ -39,6 +39,7 @@
},
"common": {
"cancel": "Hủy",
"clear": "Xóa",
"ok": "OK",
"link_copied": "Đã sao chép liên kết!",
"import_file": "Tệp",
@@ -57,7 +58,8 @@
"filter": {
"allCalendar": "Tất cả lịch",
"myCalendar": "Lịch của tôi",
"sharedCalendars": "Lịch được chia sẻ"
"sharedCalendars": "Lịch được chia sẻ",
"filters": "Bộ lọc"
},
"keywords": "Từ khóa*",
"keywordsPlaceholder": "Nhập từ khóa",