mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-23 21:21:04 +10:00
implement new invitation system
* fix comments on the frontend * move jwt token service to its own module * other fixes and updates
This commit is contained in:
@ -8,6 +8,8 @@ import { IconUsersGroup } from "@tabler/icons-react";
|
||||
interface MultiGroupSelectProps {
|
||||
onChange: (value: string[]) => void;
|
||||
label?: string;
|
||||
description?: string;
|
||||
mt?: string;
|
||||
}
|
||||
|
||||
const renderMultiSelectOption: MultiSelectProps["renderOption"] = ({
|
||||
@ -21,7 +23,12 @@ const renderMultiSelectOption: MultiSelectProps["renderOption"] = ({
|
||||
</Group>
|
||||
);
|
||||
|
||||
export function MultiGroupSelect({ onChange, label }: MultiGroupSelectProps) {
|
||||
export function MultiGroupSelect({
|
||||
onChange,
|
||||
label,
|
||||
description,
|
||||
mt,
|
||||
}: MultiGroupSelectProps) {
|
||||
const [searchValue, setSearchValue] = useState("");
|
||||
const [debouncedQuery] = useDebouncedValue(searchValue, 500);
|
||||
const { data: groups, isLoading } = useGetGroupsQuery({
|
||||
@ -56,8 +63,10 @@ export function MultiGroupSelect({ onChange, label }: MultiGroupSelectProps) {
|
||||
renderOption={renderMultiSelectOption}
|
||||
hidePickedOptions
|
||||
maxDropdownHeight={300}
|
||||
description={description}
|
||||
label={label || "Add groups"}
|
||||
placeholder="Search for groups"
|
||||
mt={mt}
|
||||
searchable
|
||||
searchValue={searchValue}
|
||||
onSearchChange={setSearchValue}
|
||||
|
||||
Reference in New Issue
Block a user