Published
Edited
Mar 25, 2021
8 forks
Importers
63 stars
Insert cell
Insert cell
Insert cell
values
Insert cell
Insert cell
valuesObjOnly
Insert cell
Insert cell
function inputsGroup(views, names, args) {
const form = html`<div class="inputs-group">${views.map(
row =>
html`<div class="inputs-group-row">${row.map(
input =>
html`<div class="inputs-group-cell" style="display:inline-block;min-width:300px">${input}</div>`
)}</div>`
)}</div>`;

form.oninput = () => {
const values = views.map(row => row.map(input => input.value));
form.value = values;

if (args && args.objOnly) form.value = {};
if (names) {
names.forEach((row, i) =>
row.forEach(
(c, j) => values[i][j] != null && (form.value[c] = values[i][j])
)
);
}
};
form.oninput();
return form;
}
Insert cell
import {slider,select} from "@jashkenas/inputs"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more