appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
32.88k stars 3.58k forks source link

[Bug]: The 'Add Row' JSONForm in the Generate a Page from Data feature is prefilled with data from first row, instead of a blank form. #25694

Open GreenFlux opened 1 year ago

GreenFlux commented 1 year ago

Is there an existing issue for this?

Description

The Generate a Page from Data feature creates two JSONForms, one for editing the selected row, and one for adding a new row. But the new row form is pre-filled with values from the first row, instead of a blank form as you would expect when adding a new row.

This could be fixed by refactoring the template used for generating a page, and using the Table widget's add a row feature instead of a JSONForm.

Alternatively, the JSONForm widget could be updated with a mode specifically for adding a row, which uses the source data to determine the type only, but does not populate the values. I have submitted this as a separate feature request.

Related Slack thread

Steps To Reproduce

  1. Use the Generate a Page from Data feature to create a new CRUD page.
  2. Click the (+) button to add a new row
  3. See that the form is pre-populated

Public Sample App

No response

Environment

Production

Issue video log

No response

Version

Appsmith v1.9.29-SNAPSHOT

GreenFlux commented 1 year ago

cc @rlnorthcutt @abm17 @rahulbarwal

rohan-arthur commented 1 month ago

CRUDgen is deprecated, so closing this issue

Nikhil-Nandagopal commented 1 month ago

@rohan-arthur it's only removed from the new user flow but it still exists in the new page section.

rohan-arthur commented 1 month ago

@Nikhil-Nandagopal this is what I see for my user. Screenshot 2024-07-15 at 16 50 05

kocharrahul7 commented 1 month ago

@rohan-arthur This is because of Anvil. Most users don't have access to it yet. @Nikhil-Nandagopal @andreevanatasha Will we be porting CRUD apps to Anvil as well?

Nikhil-Nandagopal commented 1 month ago

Yes we will port it to Anvil as well eventually.