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

zero defaultIndex not showing default name #23

Open
cicomint opened this issue Jul 24, 2019 · 7 comments
Open

zero defaultIndex not showing default name #23

cicomint opened this issue Jul 24, 2019 · 7 comments

Comments

@cicomint
Copy link

Reproduce
<SearchableDropdown defaultIndex={0} items={dataFiltered} />/

@cicomint cicomint reopened this Jul 24, 2019
@mateuszkardas
Copy link

Temporary solution for this is to pass defaultIndex as string

@RayhanYulanda
Copy link

RayhanYulanda commented Aug 11, 2019

Temporary solution for this is to pass defaultIndex as string

yes. exactly. i tried defIndex.toString() to make it works

@rayala3892
Copy link

Did you manage to solve this?

@prajna-h
Copy link

Any solution??

@prajna-h
Copy link

Temporary solution for this is to pass defaultIndex as string

yes. exactly. i tried defIndex.toString() to make it works

Hey can you tell me how to do it exactly?

@mateuszkardas
Copy link

mateuszkardas commented Sep 11, 2020

Temporary solution for this is to pass defaultIndex as string

yes. exactly. i tried defIndex.toString() to make it works

Hey can you tell me how to do it exactly?

defaultIndex={"0"} instead of defaultIndex={0}

<SearchableDropdown defaultIndex={"0"} items={dataFiltered} />

and if You have this index in variable then You must convert number to string

const index = 0;
<SearchableDropdown defaultIndex={index.toString()} items={dataFiltered} />

@prajna-h
Copy link

Temporary solution for this is to pass defaultIndex as string

yes. exactly. i tried defIndex.toString() to make it works

Hey can you tell me how to do it exactly?

defaultIndex={"0"} instead of defaultIndex={0}

<SearchableDropdown defaultIndex={"0"} items={dataFiltered} />

and if You have this index in variable then You must convert number to string

const index = 0;
<SearchableDropdown defaultIndex={index.toString()} items={dataFiltered} />

I tried but it is not working

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

No branches or pull requests

5 participants