Fabian Iwand
Fabian Iwand
Having CSS custom properties for most measurements would be ideal. These could then be overridden through inline styles set on each root element. https://github.com/observablehq/inputs/blob/f72d22b4a8302922d1f86adb15fdfe6289950254/src/style.css#L1-L5 To provide a consistent API, overrides...
I would also recommend to expose the CSS namespace, so that it can be referenced dynamically in custom stylesheets.
Note that my implementation doesn't have keyboard support yet. I'd suggest adding tabindex in the following order: 1. left handle 2. range 3. right handle This should allow for sufficient...
I'm not sure that #76 replaces the need for this issue. It only implements an alt-modifier for the clicks, but: 1. The modifier key isn't documented anywhere (as far as...
**Workaround:** Add the following cell to your notebook: ``` dispatch = (node, type = "input", bubbles = true) => node.dispatchEvent(new Event(type), {bubbles}) ``` Call with: `dispatch(viewof foo)`
I guess the selector could be made overridable via a second optional parameter? Alternatively it would have to be changed to "html". https://github.com/observablehq/inputs/blob/cc5f9d12f9d6e7ca7849942424b145695bc9de85/src/disposal.js#L4
If we don't need to support IE11, then there's also [Node.isConnected](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected). **Edit:** Nevermind, I missed that MutationObserver is called on the target element. For what it's worth, here is a...
Also mentioned [here](https://talk.observablehq.com/t/setting-ui-inputs-programmatically/6148/2): > This particular case seems to be a bug in Inputs.table() though. With multiple: false, assigning a new value will update the view’s selection, but it [won’t...
Workaround: ```js // https://github.com/observablehq/inputs/issues/217#issuecomment-1074222779 setTableIndex = (table, index = -1) => { table.querySelector('input[type="radio"]:focus')?.blur(); if(index >= 0) return table.querySelectorAll('input[type="radio"]')[index]?.onclick({}); const c = table.querySelector('th input[type="checkbox"]:checked'); if(!c) return; c.checked = false; c.onclick({}); }...
The new number widget also lacks a submit option, although that may deserve its own issue (given the unique constraints of the range widget).