Skip to content

Commit

Permalink
Merge pull request #18 from Coaktion/feat/disable-props-autocomplete
Browse files Browse the repository at this point in the history
Feat/disable props autocomplete
  • Loading branch information
MatheusDev20 authored Mar 22, 2024
2 parents d38e1e4 + 0f465ee commit 5a20511
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/aktie-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export const AktieTheme: ThemeOptions = {
},
info: {
main: '#0288D1'
},
success: {
main: '#48BB30'
}
},
typography: {
Expand Down
9 changes: 8 additions & 1 deletion src/auto-complete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ interface AktAutoCompleteProps {
groupFontWeight?: string;
iconColor?: string;
title?: string;
disabled?: boolean;
onChange: (data: any) => void;
label?: string;
}

const AktAutoComplete: React.FC<AktAutoCompleteProps> = ({
Expand All @@ -52,7 +54,9 @@ const AktAutoComplete: React.FC<AktAutoCompleteProps> = ({
groupFontWeight = 'bold',
iconColor = '#6b6b6b',
title,
onChange
disabled,
onChange,
label
}: AktAutoCompleteProps) => {
const [isOpen, setIsOpen] = useState(false);

Expand All @@ -67,6 +71,7 @@ const AktAutoComplete: React.FC<AktAutoCompleteProps> = ({
open={isOpen}
onBlur={() => setIsOpen(false)}
options={rows}
disabled={disabled}
title={title}
data-testid="auto-complete"
getOptionLabel={(option) => option[textKey]}
Expand Down Expand Up @@ -109,6 +114,8 @@ const AktAutoComplete: React.FC<AktAutoCompleteProps> = ({
{...params}
value={value}
fullWidth
label={label}
disabled={disabled}
data-testid="auto-complete-input"
InputProps={{
...params.InputProps,
Expand Down

0 comments on commit 5a20511

Please sign in to comment.