public function renderItems() {
		$items = [];
		foreach ($this->items as $i => $item) {
			if (isset($item['visible']) && !$item['visible']) {
				continue;
			}
			$items[] = $this->renderItem($item);
		}

		// Begin custom code
		$hasActive = false;
		foreach ($this->items as $i => $child) {
			if($this->isItemActive($child)) {
				$hasActive = true;
				break;
			}
		}

		if(!$hasActive) {
			Html::addCssClass($this->options, 'collapse');
		}
		// End custom code

		return Html::tag('ul', implode("\n", $items), $this->options);
	}