-
Notifications
You must be signed in to change notification settings - Fork 46
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
[Feature] Reflect network requests on button #291
[Feature] Reflect network requests on button #291
Conversation
…ver a network request is made
…save, edit story status
You need to add back the |
Oh ok thanks, added |
Can I solve this #201 issue also in this pull request? |
You can raise a different PR for that issue. Let this PR be dedicated to network request on buttons. |
@cyntss Please review this pull request. |
@kunal00000 |
@kailash360 |
I see that @kailash360 is already reviewing this PR. Thank you Kailash. You can merge it if you think it follows all our guidelines |
@kailash360 , you can merge this pr I have resolved the reviews. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
setLoading(false) | ||
} | ||
return ( | ||
<button onClick={handleClick} disabled={isLoading} {...rest}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the disabled
attribute, we should also consider the declaration of the attribute where the component is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kunal00000 resolve this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please elaborate the motive of doing so because I think it should be disabled in all cases whenever loading is happening and this is happening through this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So personalising it everywhere used would not benefit. If some alteration is needed please give your take on this.
@kailash360
Issue Number
fixes #287
Describe the changes you've made
I have created a new component which has loader on button itself that loads onclick.
Added this component to all the Button with async callbacks.
Describe if there is any unusual behavior (Any Warning) of your code(Write
NA
if there isn't)Additional context (OPTIONAL)
Test plan (OPTIONAL)
A good test plan should give instructions that someone else can easily follow.
Checklist
Provide a Deployed link of route/page that needs to review
Preview: Deploy preview link here with the appropriate route