CallumBoase / plasmic-supabase

GNU General Public License v3.0
7 stars 5 forks source link

SupabaseUppyUploader gets stuck in "Loading..." state when reset method run with initialFilePaths set #25

Open ryanmouritz opened 2 months ago

ryanmouritz commented 2 months ago

Issue: If the reset method (element action in Plasmic) is used when initialFilePaths parameter is set, the uploader component gets stuck with the UI in "Loading..." state, neither reverting to the dashboard with initialFilePaths files shown or reverting to a blank dashboard.

Expected behaviour: Dashboard to revert to displaying the initialFilePaths

How to reproduce:

  1. Add a SupabaseUppyUploader component
  2. Add an array of file paths to the initialFilePaths parameter
  3. Add a button and attach a reset action to the onClick interaction
  4. When the page loads, click the button. Loading... ensues.

Note: correct behaviour when new files are added. Reproduced by:

  1. Add a SupabaseUppyUploader component
  2. DON'T add an array of file paths to the initialFilePaths parameter
  3. Add a button and attach a reset action to the onClick interaction
  4. When the page loads, add files from the dashboard.
  5. Click the button. The dashboard is reset to an empty state.