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

Dropdown choice cannot be disabled when popup set to always #1959

Closed
VijithaEkanayake opened this issue May 2, 2023 · 0 comments · Fixed by #1961
Closed

Dropdown choice cannot be disabled when popup set to always #1959

VijithaEkanayake opened this issue May 2, 2023 · 0 comments · Fixed by #1961
Assignees
Labels
bug Bug in code ui Related to UI

Comments

@VijithaEkanayake
Copy link
Contributor

Wave SDK Version, OS

0.25.2, Mac OS

Actual behavior

The choice is always selectable irrespective of the disabled attribute of the choice being set to True when the value of the popup attribute is set to always.

Expected behavior

Choices should be disabled in the popup when the choice is disabled.

Steps To Reproduce

Use following sample code to reproduce issue.

from h2o_wave import main, app, Q, ui

choices = [
    ui.choice('A', 'Option A'),
    ui.choice('B', 'Option B'),
    ui.choice('C', 'Option C', disabled=True),
    ui.choice('D', 'Option D'),
]

choices_dialog = [ui.choice(str(i), f'Option {i}') for i in range(1, 102)]


@app('/')
async def serve(q: Q):
    q.page['example'] = ui.form_card(box='1 1 4 7', items=[
        ui.dropdown(name='dropdown', label='With Popup (Disable work)', required=True, choices=choices,values=['A']),
        ui.dropdown(name='dropdown_popup_always', label='Popup Always (Disable Not Working)', values=['A'],
                    required=True, choices=choices, popup='always'),

    ])
    await q.page.save()
@VijithaEkanayake VijithaEkanayake added the bug Bug in code label May 2, 2023
@mturoci mturoci added the ui Related to UI label May 2, 2023
marek-mihok added a commit that referenced this issue May 3, 2023
marek-mihok added a commit that referenced this issue May 3, 2023
marek-mihok added a commit that referenced this issue May 3, 2023
marek-mihok added a commit that referenced this issue May 10, 2023
…th pre-checked values, wrong order on Select all #1959
marek-mihok added a commit that referenced this issue May 15, 2023
marek-mihok added a commit that referenced this issue May 17, 2023
marek-mihok added a commit that referenced this issue May 17, 2023
marek-mihok added a commit that referenced this issue May 17, 2023
…th pre-checked values, wrong order on Select all #1959
marek-mihok added a commit that referenced this issue May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug in code ui Related to UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants