inputs
inputs copied to clipboard
searchParam option for setting initial value
It’d be nice if this
viewof id = Inputs.text({label: "id", searchParam: "id"})
were shorthand for this
viewof id = Inputs.text({label: "id", value: new URLSearchParams(location.search).get("id")})
With the second, I think it's clear that the value from the URL is only an initial value. For the first I would expect the URL would be kept up to date with changes to the input. That would be very cool, but not an exact equivalent. I also think Observable's iframe security model wouldn't allow it, right?
I also think Observable's iframe security model wouldn't allow it, right?
Correct, not without reloading.