UNPKG

selecton

Version:

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

16 lines (11 loc) 397 B
import {select as d3select} from 'd3-selection'; import {_getInputItems} from './elementHandler'; export default function (w, d, options){ _getInputItems(w).nodes().forEach(function(item){ if(options.render(d) === d3select(item).select('span.input-item-content').html()){ d.selected = false; d3select(item).remove(); return; } }); }