protected function doSelect($value, $label)
    {
        if ($this->selected) {
            if (is_array($this->selected) && count($this->selected) > 0) {
                $result = array_search($value, $this->selected);

                if ($result !== false) {
                    unset($this->selected[$result]);

                    return 'selected="selected"';
                }
            } elseif ($this->selected instanceof Closure) {
                call_user_func_array($this->selected, [$this, $value, $label]);
                $attrs = $this->renderAttr($this->optionAttr);
                $this->optionAttr = null;
                return $attrs;
            } else {
                if ($this->selected == $value) {
                    $this->selected = null;

                    return 'selected="selected"';
                }
            }
        }
    }