auth0/cosmos

Select should be able to handle an empty value

francocorreasosa opened this issue · 0 comments

(via @cristiandouce)

Is your feature request related to a problem? Please describe.
Currently, you can't have an empty string as an useful value of the Select component.

For example, this is not possible:

let filterOptions = [
  { value: "", label: "all apps" },
  { value: "custom", label: "custom apps" },
  { value: "private", label: "private apps" }
]

<Select items={filterOptions} onChange={applyfilter} />

function applyFilter(value) {
  // make request with filter value, if empty, means no filter!
}

Describe the solution you'd like
Supporting "" as a value.