h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
3.9k stars 323 forks source link

Primary button UI without label #2121

Closed vopani closed 9 months ago

vopani commented 10 months ago

Wave SDK Version, OS

0.26.0 on MacOS

Actual behaviour

Button is not primary if label is not set.

Screenshot 2023-08-28 at 6 42 48 PM

eg: Button1 isn't primary.

Expected behaviour

Button1 should be primary.

Steps To Reproduce

from h2o_wave import main, app, Q, ui

@app('/demo')
async def serve(q: Q):
    q.page['example'] = ui.form_card(
        box='1 1 4 10',
        items=[
            ui.button(name='button1', icon='Search', primary=True),
            ui.button(name='button2', label='Search', icon='Search', primary=True)
        ])

    await q.page.save()
mturoci commented 10 months ago

Thanks @vopani! Does using an empty string for the label work as a workaround?

vopani commented 10 months ago

Thanks @vopani! Does using an empty string for the label work as a workaround?

No it doesn't. Output is same.