Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emptyMessage doesn't supports ()=>JSX.Element #226

Open
jgarmar opened this issue Feb 24, 2022 · 1 comment
Open

emptyMessage doesn't supports ()=>JSX.Element #226

jgarmar opened this issue Feb 24, 2022 · 1 comment
Milestone

Comments

@jgarmar
Copy link

jgarmar commented Feb 24, 2022

Describe the bug
Example isn't working in a TSX file:

<SelectSearch
  options={options}
  search
  filterOptions={fuzzySearch}
  emptyMessage={() => (
    <div style={{ textAlign: "center", fontSize: "0.8em" }}>
      Not found renderer
    </div>
  )}
  placeholder="Select your country"
/>

TypeScript says that Type '() => JSX.Element' cannot be assigned to type 'string | (() => string) | undefined'

image

It would also be interesting if some action could be carried out with that query, for example creating it.

@tbleckert
Copy link
Owner

Thanks for the report, will fix asap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants