Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui5-combobox): adjust arrow-down behavior #10166

Merged
merged 6 commits into from
Nov 26, 2024
Merged

Conversation

ivoplashkov
Copy link
Member

No description provided.

@ndeshev
Copy link
Contributor

ndeshev commented Nov 26, 2024

As we discussed there is a bug when arrow down selects a group item which is not filtered (visible), to fix that you should modify the _getItems() function like that:

	_getItems() {
		const allItems: Array<IComboBoxItem> = [];

		this._filteredItems.forEach(item => {
			if (isInstanceOfComboBoxItemGroup(item)) {
				const visibleItems = this.open ? item.items.filter(i => i._isVisible) : item.items;
				const groupedItems = [item, ...visibleItems];
				allItems.push(...groupedItems);
				return;
			}

			allItems.push(item);
		});

		return allItems;
	}

@ivoplashkov ivoplashkov marked this pull request as ready for review November 26, 2024 08:43
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This PR is included in version v2.5.0-rc.2 🎉

The release is available on v2.5.0-rc.2

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants