Close Docs

Looping Selector (DiscoLoopingSelector)

Base class for wheel/column picker modals (used by date/time/duration pickers).

DiscoLoopingSelector extends DiscoFlyout and provides shared column behavior:

Usage

This is intended to be extended rather than used directly:

import { DiscoLoopingSelector } from 'discoui';

class MyPicker extends DiscoLoopingSelector {
  constructor() {
    super('MY APP', 'PICKER');
    this._initSliderPicker(['left', 'right']);
  }

  _onSliderCommit(kind, value) {
    console.log(kind, value);
  }
}

Built-in Flip View

The looping selector flip-view logic is built into the looping selector component implementation.

Example inside a custom picker column:

const view = document.createElement('disco-looping-selector-flip-view');
view.setAttribute('direction', 'vertical');
view.setAttribute('overscroll-mode', 'loop');
view.setAttribute('css-prefix', 'time-picker');