[Bug]: dropdown selectAllByDefault=false does not work as intended
Describe the bug
I have noticed that adding the selectAllByDefault option, regardless of true or false will result in all the options being selected. The only way to turn off this feature is to exclude the option entirely.
Steps to Reproduce
using the evidence demo and documentation, add the dropdown below. The presence of the selectAllByDefault option will trigger all options to be selected by default. Removing the option will deselect all categories by default.
<Dropdown
data={categories}
name=testSelectAll
value=category
multiple=true
selectAllByDefault=false
/>
Logs
No response
System Info
System:
OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13700H
Memory: 10.37 GB / 15.46 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 20.13.1 - ~/.local/share/mise/installs/node/20/bin/node
npm: 10.5.2 - ~/.local/share/mise/installs/node/20/bin/npm
bun: 1.1.21 - ~/.bun/bin/bun
npmPackages:
@evidence-dev/bigquery: ^2.0.7 => 2.0.7
@evidence-dev/core-components: ^4.7.5 => 4.7.5
@evidence-dev/csv: ^1.0.12 => 1.0.12
@evidence-dev/databricks: ^1.0.7 => 1.0.7
@evidence-dev/duckdb: ^1.0.11 => 1.0.11
@evidence-dev/evidence: ^39.1.4 => 39.1.4
@evidence-dev/motherduck: ^1.0.2 => 1.0.2
@evidence-dev/mssql: ^1.0.9 => 1.0.9
@evidence-dev/mysql: ^1.1.3 => 1.1.3
@evidence-dev/postgres: ^1.0.6 => 1.0.6
@evidence-dev/snowflake: ^1.1.1 => 1.1.1
@evidence-dev/sqlite: ^2.0.6 => 2.0.6
@evidence-dev/trino: ^1.0.8 => 1.0.8
Severity
annoyance
Additional Information, or Workarounds
Small bug. I am really enjoying evidence.dev so far. Keep up the great work.
does {false} have the intended effect?
@archiewood yes. Thanks.
Okay, then this is indeed a bug. awesome just need to handle the strings "false" / "true" as expected
Thanks for reporting this! It has been fixed in the latest release.
To update
- VSCode:
Evidence: Update to Latest Version - CLI:
npm install @evidence-dev/core-components@latest