Multiple react select async componenet one page using the same promiss #4714
Unanswered
cubecleveland
asked this question in
Q&A
Replies: 2 comments 1 reply
-
@cubecleveland AsyncSelect has a prop called |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks!
Does that mean i have to create 2 promise functions ? one to initially
fetched and 1 to pass to the load options ?
As of now im passing no deafultOption so i assume the component just uses
the same fecthing function to fetch on load ?
CUBE Workspace
Corporate: 6240 Som Center Rd #130
Solon, OH 44139
T: 216.245.9629
…On Wed, Oct 13, 2021 at 4:31 PM Eric Bonow ***@***.***> wrote:
@cubecleveland <https://github.com/cubecleveland> AsyncSelect has a prop
called defaultOptions which should allow you to make one request to your
api and then pass in the results mapped to options and passed in as the
defaultOptions prop into each Select.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4714 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMKORZUEQJTTWK64HHAJOJLUGXUBVANCNFSM5BWU6JZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have many Async react select on the same page .
Is there any way to have them all share the same promise for loading the data ? so it wont have to cal the api many times on render ?
Beta Was this translation helpful? Give feedback.
All reactions