pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
9.17k stars 262 forks source link

`search` value is actually not lowercase #160

Closed steven-tey closed 5 months ago

steven-tey commented 11 months ago

From README:

You can provide a custom filter function that is called to rank each item. Both strings are normalized as lowercase and trimmed.

<Command
  filter={(value, search) => {
    if (value.includes(search)) return 1
    return 0
  }}
/>

This is slightly incorrect as search is actually not lowercase.