fix: complete widget review cleanup
This commit is contained in:
1 parent
56346b2aa8
commit
f003d9ddc9
17 files changed
+279
-145
No files matched your search
@@ -30,13 +30,11 @@ export const WidgetDynamicSelectInput = ({
|
||||
const inputProps = form.getInputProps(`options.${property}`);
|
||||
const [search, setSearch] = useState("");
|
||||
const [debouncedSearch] = useDebouncedValue(search, 300);
|
||||
const { isPending, options: selectOptions } = options.useOptions(
|
||||
debouncedSearch,
|
||||
form.values.integrationIds,
|
||||
form.values.options,
|
||||
itemId,
|
||||
boardId,
|
||||
);
|
||||
const {
|
||||
error: optionsError,
|
||||
isPending,
|
||||
options: selectOptions,
|
||||
} = options.useOptions(debouncedSearch, form.values.integrationIds, form.values.options, itemId, boardId);
|
||||
const currentOption = inputProps.value as DynamicSelectOption | null;
|
||||
const onChange = inputProps.onChange as (value: DynamicSelectOption | null) => void;
|
||||
|
||||
@@ -98,6 +96,7 @@ export const WidgetDynamicSelectInput = ({
|
||||
description={options.withDescription ? tWidget("description") : undefined}
|
||||
searchable
|
||||
{...inputProps}
|
||||
error={inputProps.error ?? optionsError}
|
||||
value={currentOption === null ? null : currentOption.value}
|
||||
onChange={(selectedValue: string | null) => {
|
||||
if (selectedValue === null) {
|
||||
|
||||
Reference in new issue
Block a user