Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
@@ -273,6 +273,9 @@ export function PeopleSearch({
|
|||||||
onChange(event, mapped);
|
onChange(event, mapped);
|
||||||
}}
|
}}
|
||||||
slotProps={customSlotProps}
|
slotProps={customSlotProps}
|
||||||
|
// When render input is custom, the adornments should be handled by the custom component
|
||||||
|
forcePopupIcon={!customRenderInput}
|
||||||
|
disableClearable={!!customRenderInput}
|
||||||
renderInput={(params) =>
|
renderInput={(params) =>
|
||||||
customRenderInput
|
customRenderInput
|
||||||
? customRenderInput(params, query, setQuery)
|
? customRenderInput(params, query, setQuery)
|
||||||
|
|||||||
@@ -312,44 +312,42 @@ export default function SearchBar() {
|
|||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
endAdornment: (
|
endAdornment: (
|
||||||
<>
|
<InputAdornment position="end">
|
||||||
{params.InputProps.endAdornment}
|
{(query || selectedContacts.length > 0) && (
|
||||||
<InputAdornment position="end">
|
|
||||||
<IconButton
|
<IconButton
|
||||||
onMouseDown={(e) => e.preventDefault()}
|
aria-label={t("common.clear")}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setAnchorEl(containerRef.current);
|
setQuery("");
|
||||||
handleFilterChange("keywords", query);
|
setSearch("");
|
||||||
handleFilterChange(
|
handleFilterChange("keywords", "");
|
||||||
"organizers",
|
setSelectedContacts([]);
|
||||||
selectedContacts.map((a: User) => ({
|
|
||||||
cn: a.displayName,
|
|
||||||
cal_address: a.email || "",
|
|
||||||
partstat: "NEEDS-ACTION",
|
|
||||||
rsvp: "FALSE",
|
|
||||||
role: "REQ-PARTICIPANT",
|
|
||||||
cutype: "INDIVIDUAL",
|
|
||||||
}))
|
|
||||||
);
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<TuneIcon />
|
<HighlightOffIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</InputAdornment>
|
|
||||||
{query && (
|
|
||||||
<InputAdornment position="end">
|
|
||||||
<IconButton
|
|
||||||
onClick={() => {
|
|
||||||
setQuery("");
|
|
||||||
setSearch("");
|
|
||||||
handleFilterChange("keywords", "");
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<HighlightOffIcon />
|
|
||||||
</IconButton>
|
|
||||||
</InputAdornment>
|
|
||||||
)}
|
)}
|
||||||
</>
|
<IconButton
|
||||||
|
aria-label={t("search.filter.filters")}
|
||||||
|
onMouseDown={(e) => e.preventDefault()}
|
||||||
|
onClick={() => {
|
||||||
|
setAnchorEl(containerRef.current);
|
||||||
|
handleFilterChange("keywords", query);
|
||||||
|
handleFilterChange(
|
||||||
|
"organizers",
|
||||||
|
selectedContacts.map((a: User) => ({
|
||||||
|
cn: a.displayName,
|
||||||
|
cal_address: a.email || "",
|
||||||
|
partstat: "NEEDS-ACTION",
|
||||||
|
rsvp: "FALSE",
|
||||||
|
role: "REQ-PARTICIPANT",
|
||||||
|
cutype: "INDIVIDUAL",
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<TuneIcon />
|
||||||
|
</IconButton>
|
||||||
|
</InputAdornment>
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
+3
-1
@@ -39,6 +39,7 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
|
"clear": "Clear",
|
||||||
"ok": "Ok",
|
"ok": "Ok",
|
||||||
"link_copied": "Link copied!",
|
"link_copied": "Link copied!",
|
||||||
"import_file": "File",
|
"import_file": "File",
|
||||||
@@ -57,7 +58,8 @@
|
|||||||
"filter": {
|
"filter": {
|
||||||
"allCalendar": "All calendars",
|
"allCalendar": "All calendars",
|
||||||
"myCalendar": "My calendars",
|
"myCalendar": "My calendars",
|
||||||
"sharedCalendars": "Shared calendars"
|
"sharedCalendars": "Shared calendars",
|
||||||
|
"filters": "Filters"
|
||||||
},
|
},
|
||||||
"keywords": "Keywords*",
|
"keywords": "Keywords*",
|
||||||
"keywordsPlaceholder": "Enter keywords",
|
"keywordsPlaceholder": "Enter keywords",
|
||||||
|
|||||||
+3
-1
@@ -39,6 +39,7 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"cancel": "Annuler",
|
"cancel": "Annuler",
|
||||||
|
"clear": "Effacer",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"link_copied": "Lien copié !",
|
"link_copied": "Lien copié !",
|
||||||
"import_file": "Fichier",
|
"import_file": "Fichier",
|
||||||
@@ -57,7 +58,8 @@
|
|||||||
"filter": {
|
"filter": {
|
||||||
"allCalendar": "Tous les calendriers",
|
"allCalendar": "Tous les calendriers",
|
||||||
"myCalendar": "Mes calendriers",
|
"myCalendar": "Mes calendriers",
|
||||||
"sharedCalendars": "Calendriers partagés"
|
"sharedCalendars": "Calendriers partagés",
|
||||||
|
"filters": "Filtres"
|
||||||
},
|
},
|
||||||
"keywords": "Mots-clés*",
|
"keywords": "Mots-clés*",
|
||||||
"keywordsPlaceholder": "Saisissez des mots-clés",
|
"keywordsPlaceholder": "Saisissez des mots-clés",
|
||||||
|
|||||||
+3
-1
@@ -39,6 +39,7 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"cancel": "Отмена",
|
"cancel": "Отмена",
|
||||||
|
"clear": "Очистить",
|
||||||
"ok": "Ок",
|
"ok": "Ок",
|
||||||
"link_copied": "Ссылка скопирована",
|
"link_copied": "Ссылка скопирована",
|
||||||
"import_file": "Файл",
|
"import_file": "Файл",
|
||||||
@@ -57,7 +58,8 @@
|
|||||||
"filter": {
|
"filter": {
|
||||||
"allCalendar": "Все календари",
|
"allCalendar": "Все календари",
|
||||||
"myCalendar": "Мои календари",
|
"myCalendar": "Мои календари",
|
||||||
"sharedCalendars": "Общие календари"
|
"sharedCalendars": "Общие календари",
|
||||||
|
"filters": "Фильтры"
|
||||||
},
|
},
|
||||||
"keywords": "Ключевые слова*",
|
"keywords": "Ключевые слова*",
|
||||||
"keywordsPlaceholder": "Введите ключевые слова",
|
"keywordsPlaceholder": "Введите ключевые слова",
|
||||||
|
|||||||
+3
-1
@@ -39,6 +39,7 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"cancel": "Hủy",
|
"cancel": "Hủy",
|
||||||
|
"clear": "Xóa",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"link_copied": "Đã sao chép liên kết!",
|
"link_copied": "Đã sao chép liên kết!",
|
||||||
"import_file": "Tệp",
|
"import_file": "Tệp",
|
||||||
@@ -57,7 +58,8 @@
|
|||||||
"filter": {
|
"filter": {
|
||||||
"allCalendar": "Tất cả lịch",
|
"allCalendar": "Tất cả lịch",
|
||||||
"myCalendar": "Lịch của tôi",
|
"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*",
|
"keywords": "Từ khóa*",
|
||||||
"keywordsPlaceholder": "Nhập từ khóa",
|
"keywordsPlaceholder": "Nhập từ khóa",
|
||||||
|
|||||||
Reference in New Issue
Block a user