Closed
Description
Summary
Advanced Select add & remove options don't work after update
Steps to Reproduce
Tried using the example component in the docs
- Click "Add Three Options" button
- Click "Remove values 5,6,7" button
- View console for error
Demo Link
https://preline.co/docs/advanced-select.html#add-remove-options
Expected Behavior
- The
removeOption
should work as intended. - No console.log messages should be shown, especially in production.
Actual Behavior
- console.log messages are shown, seems to be and the affected option's
val
values andfalse
- The console throws an error:
Uncaught TypeError: Cannot read properties of null (reading 'length')
and doesn't do anything else.
Seems to occur in single select dropdowns, the multiple select example in the docs has no issue.
This also happens in one of my projects, when I tried upgrading the package version due to this bug: #414 , where in my case no items are removed.
Preline version: ^2.4.1
Chrome version: Version 126.0.6478.185 (Official Build) (arm64)