oruga-ui / oruga

🐛 Oruga is a lightweight library of UI components without any CSS framework dependency
https://oruga-ui.com
MIT License
1.13k stars 172 forks source link

Dropdown with multiple selection closes after selecting item (v0.9.0 Regression) #1108

Closed jh0ker closed 1 week ago

jh0ker commented 1 week ago

Overview of the problem

Oruga version: v0.9.0 Vuejs version: 3.5.12 OS/Browser: Windows Firefox/Brave

Description

When selecting a dropdown item in a dropdown with multiple set, the item is selected, but the dropdown closes.

Steps to reproduce

  1. Visit https://oruga-ui.com/components/Dropdown.html and go to the Multiple example
  2. Open the dropdown
  3. Select any option

Expected behavior

The dropdown should remain open, to allow the selection of more items. This used to be the behavior in v0.8

Actual behavior

The dropdown closes

Fix suggestion

It appears that in commits 3e4291ac94556603543a92bd17bec2f5b8cc60db and d6b792f0850d59ea85857c8ff7a9e4db570d134a, the line at https://github.com/oruga-ui/oruga/blob/8fb6f7620351363705098897d8022e277c40c81e/packages/oruga/src/components/dropdown/Dropdown.vue#L338 was missed and should have been changed to if (!isTrueish(props.multiple)) {, similar to other references to props.multiple.

mlmoravek commented 1 week ago

Hey @jh0ker, thanks for checking out the new version and for finding this issue!

Will be fixes soon.

jh0ker commented 1 week ago

Hey! I appreciate the quick response. Thank you for your work!