All the sliders depend on either a generator or promise (respectively one that keeps the time if requested, and one that yields the current location). This stopped working recently. It turns out the sliders never yield a value until you drag them. These are the Sliders from @observablehq/inputs.
Or alternatively, is there a canonical way to set inputs to a value by default that you can only obtain asynchronously?
The problem isnât promises; itâs the step option.
Youâve defined the observer_lat and observer_lon range inputs using step = 0.1; however, youâre setting the initial value of the range inputs to a value that does not match the specified step interval, and hence is considered invalid. Previously the range input would implicitly round an invalid value on assignment to the closest value according to the step, but in a recent release it was made more strict and ignores invalid values on assignment (which is what most inputs do).
A quick fix is to round the initial values to match the step, e.g. using number.toFixed (which technically returns a string, but itâll get coerced back to a number immediately, so that seems fine):
Iâve also filed this issue to track, since it wasnât really my intention to change the behavior here and probably itâs desirable to have the implicit autocorrect for invalid values on range inputs.