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

Select.Async does not call onInputChange #1283

Closed
bmamouri opened this issue Oct 6, 2016 · 5 comments
Closed

Select.Async does not call onInputChange #1283

bmamouri opened this issue Oct 6, 2016 · 5 comments

Comments

@bmamouri
Copy link

bmamouri commented Oct 6, 2016

I am trying to implement this demo using Select.Async.

The event onInputChange does not call in the Select.Async component, but it works fine in the Select component itself.

@kr0
Copy link

kr0 commented Oct 13, 2016

There was a fix with this. However, its not reflected in the code available through NPM. For right now I'm pointing dependency in package.json to github url.

@kr0
Copy link

kr0 commented Oct 13, 2016

I opted to use 1.0.0-rc.1 instead of rc.2

@aminmc
Copy link

aminmc commented Jan 3, 2017

This seems to be still an issue in rc.2 downgrading to rc.1 works.

@mhubenthal
Copy link
Contributor

I am seeing this issue as well for the Creatable component. The bug lies on these lines in that component:

onInputChange (input) {
	const { onInputChange } = this.props;

	if (onInputChange) {
		onInputChange(input);
	}

	// This value may be needed in between Select mounts (when this.select is null)
	this.inputValue = input;
}

Even though onInputChange() is called, the value is not returned. When I just use the Select component I am able to apply a masking function, whereas when using the Creatable component, that masking function value is never returned from the Creatable onInputChange call to the Select component. The function passed in as a prop is called, but the value is never returned up the call stack.

The correct code would look like this:

onInputChange (input) {
	const { onInputChange } = this.props;

	// This value may be needed in between Select mounts (when this.select is null)
	this.inputValue = input;

	if (onInputChange) {
		return onInputChange(input);
	}
}

cc: @JedWatson

@bladey
Copy link
Contributor

bladey commented May 27, 2020

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues / pull requests.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version.

If you feel this issue / pull request is still relevant and you'd like us to review it, please leave a comment and we'll do our best to get back to you.

@bladey bladey closed this as completed May 27, 2020
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