Skip to content

Commit

Permalink
Fix not being able to create a first item.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswilddev committed Dec 2, 2021
1 parent 62b6db4 commit f36f86a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/createCreatableSelectComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function createCreatableSelectComponent<

return (
<FullHeightPopover
disabled={disabled || options.length === 0}
disabled={disabled}
valid={!required || selectedOption !== null}
label={selectedOption === null ? null : selectedOption.label}
placeholder={placeholder}
Expand Down
4 changes: 2 additions & 2 deletions components/createCreatableSelectComponent/unit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ test(`renders as expected without any options`, () => {

expect(rendered).toMatchObject({
props: {
disabled: true,
disabled: false,
valid: true,
label: null,
placeholder: `Example Placeholder`,
Expand Down Expand Up @@ -796,7 +796,7 @@ test(`renders as expected when required without any options`, () => {

expect(rendered).toMatchObject({
props: {
disabled: true,
disabled: false,
valid: false,
label: null,
placeholder: `Example Placeholder`,
Expand Down

0 comments on commit f36f86a

Please sign in to comment.