Skip to content

Commit

Permalink
fix: hide drop down if depends on options is empty (#42)
Browse files Browse the repository at this point in the history
* fix: hide drop down if depends on options is empty

* ci: update to nx ci v9
  • Loading branch information
shawnmclean committed Nov 15, 2022
1 parent f268426 commit 9cdda03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
main:
# nrwl's CI script: https://github.com/nrwl/ci
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.5
uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.9
with:
number-of-agents: 1
parallel-commands: |
Expand All @@ -22,6 +22,6 @@ jobs:
agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.5
uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.9
with:
number-of-agents: 1
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export function DropdownInput({
?.filter((choice) => choice.group === dependentAnswer)
.map((choice) => choice.label) || [];

if (options.length <= 0) {
return null;
}
return (
<Controller
name={id}
Expand All @@ -52,7 +55,6 @@ export function DropdownInput({
<Select
native
defaultValue=""
label={title}
id={`${id}-dropdown`}
onBlur={onBlur}
onChange={onChange}
Expand Down

0 comments on commit 9cdda03

Please sign in to comment.