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

Manually set 'isLoading' state for async selects #3690

Merged
merged 2 commits into from
Oct 2, 2019

Conversation

csilkwor
Copy link
Contributor

Fixes #2986

@csilkwor csilkwor force-pushed the Async_isLoading_fix branch from ee48fd0 to 0c2d7ec Compare July 23, 2019 16:43
@csilkwor
Copy link
Contributor Author

There is a related pr already open for this issue, but it has been dormant and sitting with a merge conflict for a few months.

It is necessary for my use case to be able to explicitly set the loading property of an asynchronous select. This change keeps the current functionality intact while allowing the loading indicator to be displayed at the discretion of the developer.

@comfroels
Copy link

@JedWatson Is it possible for someone to maybe take a look at this?

@oudoulj
Copy link

oudoulj commented Jul 30, 2019

I have an Async select and would like to always hide the "Loading..." and the 3 dots on the right while typing and there is no result yet.
How do I do that ?
Thanks!
Async select

@oudoulj
Copy link

oudoulj commented Aug 20, 2019

I have an Async select and would like to always hide the "Loading..." and the 3 dots on the right while typing and there is no result yet.
How do I do that ?
Thanks!
Async select

I am replying to myself.
I was able to hide both the Loading indicator and its 3 dots on the right by using the Styles mentioned here
Something like that :

<AsyncSelect
        ...
        styles={myStyles}
/>

export const myStyles = {
        ...
        loadingIndicator: () => {
		return {
			display: "none"
		};
	},
	loadingMessage: () => {
		return {
			display: "none"
		};
	}
};

@RobertDaleSmith
Copy link

@JedWatson Please merge. I could really use this so that I can show the loading indicator on AsyncCreatableSelect while onCreateOption is fetching.

@changeset-bot
Copy link

changeset-bot bot commented Oct 2, 2019

🦋 Changeset is good to go

Latest commit: 4cf6c43

We got this.

Not sure what this means? Click here to learn what changesets are.

@JedWatson
Copy link
Owner

Looks good, thanks @csilkwor! sorry for the delay merging. Will ship with the next release!

@Mujaddadi
Copy link

I am still facing this issue. Not sure it is released yet or not.

@sirjuan
Copy link

sirjuan commented Jan 23, 2020

Could this please be released @JedWatson?

@laznic
Copy link

laznic commented Jan 23, 2020

@JedWatson could you do a release with this fix included please?

@makker
Copy link

makker commented Jan 23, 2020

It would be greatly appreciated if this could be be released. Thanks for the awesome work with the project!

@mika-kaki
Copy link

This fix would be greatly appreciated! Thanks for a great project!

@yannbriancon
Copy link

I agree with all the previous comments, I'd love to see this released!
Always cool to work with this project!

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

Successfully merging this pull request may close these issues.

[v2] No way to manually set isLoading on async select box