Skip to content
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

[Bug]: Query Editor incorrectly believes there is an error and that Table's "newRow" object is "unknown" #37188

Open
1 task done
dmilkie opened this issue Nov 1, 2024 · 1 comment
Assignees
Labels
Bug Something isn't working Community Reported issues reported by community members Low An issue that is neither critical nor breaks a user flow Needs Triaging Needs attention from maintainers to triage Production Table Inline Edit Issues related to inline editing Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets

Comments

@dmilkie
Copy link

dmilkie commented Nov 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description

When I referenece a newRow from a table, I expect the editor to know about it

Steps To Reproduce

When adding a new row to a Table, you will want to reference the new row in performing Queries. The correct object (I believe) is {{ Table1.newRow }} https://docs.appsmith.com/reference/widgets/table#newrow-object
and this Query is successful.

However, the Query editor reports:

TypeError: entityIcon InsertFishClass: "data_table.newRow" is undefined . Please fix the binding.

Public Sample App

No response

Environment

Deploy Preview

Severity

Low (Cosmetic UI issues)

Issue video log

No response

Version

Cloud

@dmilkie dmilkie added Bug Something isn't working Needs Triaging Needs attention from maintainers to triage labels Nov 1, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added Community Reported issues reported by community members Deploy Preview Issues found in Deploy Preview Low An issue that is neither critical nor breaks a user flow Production Table Inline Edit Issues related to inline editing and removed Deploy Preview Issues found in Deploy Preview labels Nov 1, 2024
@github-actions github-actions bot added Widgets Product This label groups issues related to widgets Widgets & Accelerators Pod Issues related to widgets & Accelerators labels Nov 4, 2024
@rahulbarwal
Copy link
Contributor

rahulbarwal commented Nov 4, 2024

@dmilkie
Your assumption is correct: The correct object is {{ Table1.newRow }}
Now why do you get this error:

TypeError: entityIcon InsertFishClass: "data_table.newRow" is undefined . Please fix the binding.

  • Unless you've clicked on Add new row, Table1.newRow is undefined
  • Hence accessing any properties on that results in error.
  • When you click on Add new row, the Table.newRow gets empty object as value {}
  • Then even if values does not exist in the object, it will not throw error.

One workaround to mitigate this problem in QueryEditor is using {{(Table1.newRow || {}).property_name}}; this way it always gets the property.

Now as to why it is such and can it be fixed, we will evaluate and get back to it. This is not in top of our concerns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Community Reported issues reported by community members Low An issue that is neither critical nor breaks a user flow Needs Triaging Needs attention from maintainers to triage Production Table Inline Edit Issues related to inline editing Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
Development

No branches or pull requests

6 participants