Closed mbostock closed 2 years ago
I feel this should also support assignment as described here: https://github.com/observablehq/inputs/issues/73#issuecomment-779358949
Update: done.
This implementation doesn't seem to handle native inputs in the same way Generators.input does, right?
It doesn’t automatically adapt inputs that don’t emit input events and expose an input.value, no, but it will work with any native inputs that conform to this representation (such as type=range, though you’ll get a string value instead of a number).
Any thoughts on this one, @Fil? (I’ll get to that Legends PR soon…)
I like the fact that it's hierarchical, like the good old dat-gui; however in that case, we could want a way to pass styling or fieldset+label options to the children, if we want the inputs structure to be visible? This would be useful in general but particularly so for nested inputs. But maybe that's for another project.
Another idea is that we could also support a Map of inputs, that would return a Map of values (or maybe a key.value object). It would seem more consistent with Inputs.select, for example, and lists of options generated by, say, d3.rollup.
I'd love see an option for a template callback added that simply receives the inputs array/object as passed to Inputs.form(), and returns the outermost element.
Nice idea. Added.
When will the new release get deployed to Observable?
In the near future.
Is it possible for the properties of an input in a form to depend on the value of another in the same form?
Fixes #73. Demo: https://observablehq.com/d/4108c4771279ad1a