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

ui.select with_input=True does not work with props 'use-chips' #1044

Closed
groucho86 opened this issue Jun 18, 2023 · 1 comment
Closed

ui.select with_input=True does not work with props 'use-chips' #1044

groucho86 opened this issue Jun 18, 2023 · 1 comment
Assignees
Milestone

Comments

@groucho86
Copy link
Contributor

groucho86 commented Jun 18, 2023

Description

Unable to select/mouse click filtered dropdown when use-chips is enabled.

eg:

from nicegui import ui
names = ['Alice', 'Bob', 'Carol']
ui.select(names, multiple=True, value=names[:2], label='with chips', with_input=True) \
    .props('use-chips').classes('w-64')
ui.run()
@falkoschindler
Copy link
Contributor

Thanks for bringing this up, @groucho86!

The problem is that we set hide-selected if with_input is true. Otherwise you'd see the current name twice, which looks odd. But for multi-selection hide-selected might not be a good choice. Maybe we should set it only if multiple is false...

For now, you can work around this problem by explicitly removing hide-selected:

ui.select(['Alice', 'Bob', 'Carol'], multiple=True, with_input=True).classes('w-64') \
    .props('use-chips', remove='hide-selected')

@falkoschindler falkoschindler added this to the 1.2.22 milestone Jun 19, 2023
@falkoschindler falkoschindler self-assigned this Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants