Public
Edited
Feb 20
Paused
6 forks
Importers
32 stars
Insert cell
Insert cell
viewof mas = multiAutoSelect({
options: states,
placeholder: "Select some US states . . .",
value: ["California", "Washington", "Alabama"],
label: "State"
})
Insert cell
mas
Insert cell
Insert cell
viewof a = Inputs.bind(multiAutoSelect({
options: states,
placeholder: "Select some US states . . .",
value: ["California", "Washington", "Alabama"],
label: "State"
}), viewof mas )
Insert cell
states = usa.objects.states.geometries.map((d) => d.properties.name)
Insert cell
Insert cell
viewof eg2 = multiAutoSelect({ options: objects, attr: (d) => d.name , debug:true})
Insert cell
objects = [
{ id: 1, name: "John" },
{ id: 2, name: "Alexis" },
{ id: 3, name: "Guerra" },
{ id: 4, name: "Gomez" }
]
Insert cell
eg2
Insert cell
## Testing with numbers
Insert cell
multiAutoSelect({ options: d3.range(20).slice(1, 20) })
Insert cell
import { input, usa } from "@jashkenas/inputs"
Insert cell
Sortable = require("sortablejs")
Insert cell
Insert cell
viewof persisted = PersistInput("states", multiAutoSelect({
options: states,
placeholder: "Select some US states . . .",
value: [],
label: "State"
}))
Insert cell
Inputs.bind(Inputs.checkbox(states), viewof persisted)
Insert cell
persisted
Insert cell
Insert cell
MultiAutoSelect = {
try {
console.log("Trying to load module local");
return await require(`http://localhost:8080/dist/multiAutoSelect.js?${Date.now()}`);
} catch (e) {
console.log("Failed. Trying to load module from NPM");
return await require("multi-auto-select@0.0.10");
}
}
Insert cell
multiAutoSelect = MultiAutoSelect
Insert cell
import {PersistInput} from '@john-guerra/persist-input'
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more