appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Bug] When storeValue is called at the start of an onClick function, the button stops loading

Open ayushpahwa opened this issue 5 years ago • 3 comments

Description

In a discussion with a user on discord, they are facing an issue with loading not being shown onClick. On checking, it was found that the storeValue was there at the start of the onClick function. This is causing the loading to show and stop immediately.

Steps to reproduce the behavior:

Add steps to reproduce this behaviour, including console/network logs & screenshots

  1. Add an API call to the onClick of the button widget
  2. Click on the button and the loading shows
  3. Now in the onClick JS, add a storeValue call at the start of the function/
  4. Now, click the button and the loading will show for a bit and then disappear.

Important Details

  • Version: Cloud and Self-Hosted
  • OS: MacOSX
  • Browser chrome
  • Environment production

ayushpahwa avatar Aug 24 '21 11:08 ayushpahwa

Assign me this issue

ankit-jha1210 avatar Oct 03 '21 15:10 ankit-jha1210

Thanks for your interest @J-Ankit2020. This is not really a Good first issue. I'll remove the tag. Please find some other issue to contribute and tag me. I'll assign it ASAP

https://github.com/appsmithorg/appsmith/issues?q=is%3Aopen+is%3Aissue+label%3Ahacktoberfest

hetunandu avatar Oct 04 '21 06:10 hetunandu

Cannot seem to reproduce this anymore. Can you confirm @ayushpahwa I tested with

{{
storeValue('epochtime', Date.now());
Api1.run(() => {
  Api2.run(() => {
    Api3.run();
  });
});
}}

hetunandu avatar Nov 17 '21 09:11 hetunandu