UNPKG

selecton

Version:

Selecton.js combines a searchbar and a dropdown menu with nested child lists.

20 lines (15 loc) 525 B
import {select as d3select} from 'd3-selection'; import {_getInputSearch} from './elementHandler'; export default function (w, _handleKeyUpInteraction, _preventTabDefault){ d3select('div.input-item-clone').remove(); d3select(this.parentNode).classed('drag-active', false); _getInputSearch(w) .append('input') .attr('class', 'selecton-search-input') .on('keyup', _handleKeyUpInteraction) .on('keydown', _preventTabDefault); return { x : 0, y : 0 }; }