ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: единый realtime слой Tasker
Добавлен NODE.DC realtime event stream для workspace/project/member/invite/profile событий. Обновлены frontend stores и live controller. Доработаны settings modal, member dropdown и confirm remove под NODE.DC UX.
This commit is contained in:
@@ -58,14 +58,6 @@ export function CustomSearchSelect(props: ICustomSearchSelectProps) {
|
||||
const filteredOptions =
|
||||
query === "" ? options : options?.filter((option) => option.query.toLowerCase().includes(query.toLowerCase()));
|
||||
|
||||
const comboboxProps: any = {
|
||||
value,
|
||||
onChange,
|
||||
disabled,
|
||||
};
|
||||
|
||||
if (multiple) comboboxProps.multiple = true;
|
||||
|
||||
const openDropdown = () => {
|
||||
setIsOpen(true);
|
||||
if (referenceElement) referenceElement.focus();
|
||||
@@ -74,7 +66,7 @@ export function CustomSearchSelect(props: ICustomSearchSelectProps) {
|
||||
|
||||
const closeDropdown = () => {
|
||||
setIsOpen(false);
|
||||
onClose && onClose();
|
||||
onClose?.();
|
||||
};
|
||||
|
||||
const handleKeyDown = useDropdownKeyDown(openDropdown, closeDropdown, isOpen);
|
||||
@@ -85,10 +77,24 @@ export function CustomSearchSelect(props: ICustomSearchSelectProps) {
|
||||
else openDropdown();
|
||||
};
|
||||
|
||||
const handleChange = (nextValue: any) => {
|
||||
onChange(nextValue);
|
||||
if (!multiple) closeDropdown();
|
||||
};
|
||||
|
||||
const comboboxProps: any = {
|
||||
value,
|
||||
onChange: handleChange,
|
||||
disabled,
|
||||
};
|
||||
|
||||
if (multiple) comboboxProps.multiple = true;
|
||||
|
||||
return (
|
||||
<Combobox
|
||||
as="div"
|
||||
ref={dropdownRef}
|
||||
role="presentation"
|
||||
tabIndex={tabIndex}
|
||||
className={cn("relative flex-shrink-0 text-left", className)}
|
||||
onKeyDown={handleKeyDown}
|
||||
|
||||
Reference in New Issue
Block a user