protected function renderSortButtonDropdown()
    {
        $attributes = empty($this->attributes) ? array_keys($this->sort->attributes) : $this->attributes;
        $links = [];
        foreach ($attributes as $name) {
            $links[] = Html::tag('li', $this->sort->link($name, [
                'tabindex' => '-1'
            ]));
        }

        if (empty($this->label))
            $this->label = 'Sort';

        return \yii\bootstrap\ButtonDropdown::widget([
            'label' => $this->label,
            'dropdown' => [
                'items' => $links
            ]
        ]);
    }