ing-bank / lion

Fundamental white label web component features for your design system.
https://lion-web.netlify.app/
MIT License
1.74k stars 292 forks source link

[combobox] invoker button demo broken (likely due to code change) #2325

Open tlouisse opened 1 month ago

tlouisse commented 1 month ago

Expected behavior

When I click on the invoker, the listbox dropdown opens: https://lion-web.netlify.app/components/combobox/use-cases/#invoker-button

Actual Behavior

It does not open. Most likely the cause is inside the code and not in the demo.

When we fix it, we must make sure to add tests for this use case

MiB-1 commented 1 month ago

Hi @tlouisse , it is opening the listbox dropdown because of the @click event from the stories file.

    @click="${({ currentTarget: el }) => {
      el.opened = !el.opened;
    }}"

do I need to remove and create PR?

tlouisse commented 1 week ago

Hi @MiB-1, the problem is that this click handler was supposed to toggle the dropdown visibility before on button click, but doesn't... (also when the click handler is removed in this demo)

I think this might be introduced here: https://github.com/ing-bank/lion/commit/b50b960daa7a8e1e367cb843913b9de895ad111a