/* * ITFlow select - the picker behind every IS THE ONLY STATE * * The picker keeps no copy of the options or the value. Every time it draws it * reads them off the real : * * select.innerHTML = ... redraws by itself (MutationObserver) * select.value = 4 redraws by itself (value setter, see below) * option.selected = true redraws by itself * form.reset() redraws by itself * * There is nothing to "sync" or "refresh" by hand, which is where the old * widget kept drifting out of step with the form. * * WHAT IT LOOKS LIKE * * The field is a .form-select, so it is the same height, border, chevron and * focus ring as every other control and drops into .input-group as before. * Clicking it opens a panel with a search box (long lists, multi selects and * data-tags fields), the options, and a tick on what is chosen. Multi selects * show chips in the field and a checklist in the panel that stays open while * you pick; their change event fires once, when the panel closes, so a filter * that submits on change submits once with everything you picked. On a phone * the panel comes up from the bottom of the screen instead. * * OPTION EXTRAS - all optional, set on the