Skip to content

Commit

Permalink
fix(single-select): fix duplicate disabled/isDisabled prop and fix ty…
Browse files Browse the repository at this point in the history
…ping (#559)
  • Loading branch information
ehsan-github authored Jan 11, 2024
1 parent c79e758 commit e6147f0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/components/single-select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
BoxProps,
Flex,
FormControl,
FormControlProps,
FormErrorMessage,
FormLabel,
HStack,
Expand Down Expand Up @@ -50,14 +51,14 @@ type Conditionals =
};

export type Props = ParentProps &
FormControlProps &
CleanBoxProps &
Conditionals & {
editable?: boolean;
value: SingleSelectOption['value'];
options: SingleSelectOption[] | string[];
placeholder?: string;
label?: string;
disabled?: boolean;
width?: string | number;
maxListHeight?: string;
labelAction?: React.ReactNode;
Expand All @@ -68,8 +69,6 @@ export type Props = ParentProps &
isClearable?: boolean; // just show X or not
labelPosition?: 'side' | 'inline' | 'outside';
invertLabelPosition?: boolean;
isInvalid?: boolean;
isDisabled?: boolean;
isLoading?: boolean;
errorMessage?: ReactNode;

Expand All @@ -88,7 +87,6 @@ export const SingleSelect = ({
value,
onChange,
placeholder,
disabled,
label,
labelAction,
width,
Expand All @@ -99,8 +97,6 @@ export const SingleSelect = ({
isClearable = false,
labelPosition = 'outside',
invertLabelPosition = false,
isInvalid,
isDisabled,
isLoading,
errorMessage = '',
menuPlacement,
Expand Down Expand Up @@ -143,8 +139,6 @@ export const SingleSelect = ({
alignItems="baseline"
justifyContent="start"
flexDirection={flexDirection}
isInvalid={isInvalid}
isDisabled={disabled}
{...props}
>
{['outside', 'side'].includes(labelPosition) && label && (
Expand Down

0 comments on commit e6147f0

Please sign in to comment.