clearChoices(reset_value) {
		const ul = this.node.querySelector('ul');
		const lis = ul ? ul.querySelectorAll('li[data-value]') : [];
		const len = lis.length - (this.options.create ? 1 : 0);
		const val = reset_value ? null : this.getValue();

		for (let i = 0; i < len; i++) {
			const lival = lis[i].getAttribute('data-value');
			if (val == null ||
				(!this.options.multiple && val != lival) ||
				(this.options.multiple && val.indexOf(lival) == -1))
				ul.removeChild(lis[i]);
		}

		if (reset_value)
			this.setValues(this.node, {});
	}
Remove all existing choices from the dropdown menu.

This function removes all preexisting dropdown choices from the widget,
keeping only choices currently being selected unless `reset_values` is
given, in which case all choices and deselected and removed.

@instance
@memberof LuCI.ui.Dropdown
@param {boolean} [reset_value=false]
If set to `true`, deselect and remove selected choices as well instead
of keeping them.