INNER CODE UNIT · JavaScript

AutoComplete

vijos/vj4 · vj4/ui/components/autocomplete/index.js:11

export default class AutoComplete extends DOMAttachedObject {
  static DOMAttachKey = 'vjAutoCompleteInstance';

  constructor($dom, options = {}) {
    super($dom);
    this.options = {
      items: async () => [],
      render: () => '',
      text: () => null,
      minChar: 1,
      cache: true,
      clearDefaultValue: true,
      position: 'bottom left',
      classes: '',
      ...options,
    };
    this.clear(this.options.clearDefaultValue);
    this.menuShown = false;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…