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

focused option starting at the selected option #3656

Closed
csantos1113 opened this issue Jun 27, 2019 · 13 comments
Closed

focused option starting at the selected option #3656

csantos1113 opened this issue Jun 27, 2019 · 13 comments

Comments

@csantos1113
Copy link

csantos1113 commented Jun 27, 2019

Seems that on v3.0.0 there was a change introduced in the way the focused option is determined.

Here is an example of how it worked on v2.4.4: https://codesandbox.io/s/react-codesandboxer-example-sywkk

2019-06-27 15 26 48

  • Selected option ==> Blue background ==> "Purple" option
  • Focused option ==> Light blue ==> Starts in "Purple" option and you could move from there.

Which is the same as the behavior of the native select inputs:
2019-06-27 15 33 24


Here is the same exact example running on v3.0.4: https://codesandbox.io/s/react-codesandboxer-example-3cutx

2019-06-27 15 30 52

  • Selected option ==> Blue background ==> "Purple" option
  • Focused option ==> Light blue ==> Starts in "Ocean" option.

Not sure if this is an issue, or if it was a change intentional made.
But, how can I get the focused option starting at the selected option?

@ankush29
Copy link

ankush29 commented Jun 28, 2019

solved bb9c1d7

@csantos1113
Copy link
Author

Thanks @ankush29 - will be fixed on PR #3652

@guiyep
Copy link

guiyep commented Jul 22, 2019

Hello,

I still see this error happening in 3.0.4. Any idea when this is going to be merged?

Thanks for the good work!
Guiyep

@dicrescenzoa
Copy link

Thanks @ankush29 - will be fixed on PR #3652

Waiting for this fix 👍 as well

@imnikij
Copy link

imnikij commented Aug 20, 2019

Hey @csantos1113 I am getting same error on v2.4,4, are you sure this occurs only for v3.0.0 and above ? Any fix for this ? I am overriding Option component as below:

       const Option = (props) => {
            const path =`xyz`
            return <div>
                <Link to={path}>
                    <components.Option {...props} />
                </Link>
            </div>
        };

        selectorComponent = <Select
            label='Select ...'
            value={this.props.selectedValue}
            options={Options}
            onChange={this.onChange}
            isDisabled={this.props.isLoading }
            backspaceRemovesValue={true}
            closeMenuOnSelect={true}
            escapeClearsValue={true}
            isSearchable={true}
            isClearable={true}
            components={{
                Option
            }}
        />;

Am I missing something that should be added in v2.4.4, or is it that now this feature does not work for this version as well ?

@guiyep
Copy link

guiyep commented Oct 22, 2019

Hello, Any update on this?

I still see this happening in 3.0.8.

Thanks!

@carlosriveroib
Copy link

yes, still happening in 3.0.8. Will you update this?

@nsobolev
Copy link

Go update, please! :)

@Zorak070
Copy link

Zorak070 commented Mar 5, 2020

This issue is still prevailing. Any solutions till now?

@dicrescenzoa
Copy link

dicrescenzoa commented Mar 5, 2020

This issue is still prevailing. Any solutions till now?

this it the PR related to this issue, It seems it's taking more than a year to be resolved. I think that would be better to move on another library:

https://github.com/furqanZafar/react-selectize/

@asazernik
Copy link

This seems to have been fixed in #3868 (though @andreme reports there's still a bug in the fix). Can we close this out?

@csantos1113
Copy link
Author

Yes, let's close this.

I forked my own example and updated to latest react-select version 3.1.0 and it's working as expected now: https://codesandbox.io/s/react-codesandboxer-example-pcfsi

Thanks

@samselfridge-cnc
Copy link

If anyone is still running into this in 5.1.0, its because the object being passed into value isn't the same value from the options list.

@alexmnv pointed this out here:

See this sandbox, forked from the one above

This didn't work for my use case sadly, but hoping it helps others in the future.

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

10 participants