Skip to content

Commit

Permalink
feat: up
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOliveiraM committed Sep 19, 2023
1 parent f6d72eb commit 08115e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"react",
"typescript"
],
"version": "2.3.3",
"version": "2.3.4",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
"types": "./dist/index.d.ts",
Expand Down
9 changes: 6 additions & 3 deletions src/components/molecules/Fields/AsyncSelect/AsyncSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ export type AsyncSelectProps<FormType extends FieldValues> = {
error?: string | undefined | null | 'generic_error'
noOptionsMessage: string
isMulti?: boolean
loadOptions: (inputValue: string) => Promise<AsyncSelectOption[]>
loadOptions: (inputValue?: string | undefined) => Promise<AsyncSelectOption[]>
defaultOptions?: AsyncSelectOption[]
debounceTime?: number
isClearable?: boolean
isSearchable?: boolean

name: Path<FormType>
label: string
Expand All @@ -44,6 +45,7 @@ const AsyncSelect = <FormType extends FieldValues>(props: AsyncSelectProps<FormT
label,
debounceTime,
isClearable,
isSearchable,
error,
isMulti,
noOptionsMessage,
Expand Down Expand Up @@ -160,7 +162,7 @@ const AsyncSelect = <FormType extends FieldValues>(props: AsyncSelectProps<FormT
aria-label={label}
isDisabled={disabled}
data-cy={slugify(`select-${label}`)}
isSearchable
isSearchable={isSearchable}
noOptionsMessage={() => noOptionsMessage}
/>
)
Expand Down Expand Up @@ -200,7 +202,7 @@ const AsyncSelect = <FormType extends FieldValues>(props: AsyncSelectProps<FormT
aria-label={label}
isDisabled={disabled}
data-cy={slugify(`select-${label}`)}
isSearchable
isSearchable={isSearchable}
noOptionsMessage={() => noOptionsMessage}
/>
)
Expand All @@ -219,6 +221,7 @@ AsyncSelect.defaultProps = {
defaultOptions: undefined,
debounceTime: 700,
isClearable: true,
isSearchable: true,
placeholder: undefined,
isMulti: undefined,
reactSelectProps: undefined,
Expand Down

0 comments on commit 08115e4

Please sign in to comment.