Skip to content

Conditionally revealing inputs based on another input in a Framework Doc #1673

Answered by Fil
jack-davison asked this question in Q&A
Discussion options

You must be logged in to vote

Sure. You could name the input and display it conditionally:

```js
const category = view(Inputs.select(["A", "B", "C"]))
const valueInput = Inputs.range([1,100])
const value = Generators.input(valueInput);
```

${category === "A" ? valueInput : ""}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jack-davison
Comment options

@Fil
Comment options

Fil Sep 19, 2024
Collaborator

Answer selected by jack-davison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants