## Description
<ins>Problem</ins>
`currentRow` variable which is availabe in property pane of col settings
- is not getting correct value during runtime if the table is sorted or
filtered.
<ins>Root cause</ins>
* We are considering `processedTableData` to get the `currentRow`.
* This property is not updated during filtering and sorting, another
property `filteredTableData` is updated instead.
* We CANNOT use `filteredTableData` as it depends on `primaryColumns`
property which we intend to update as well - this is leading to cyclic
dependency during evaluations.
<ins>Solution</ins>
Since the problem is related to edit cases and given the constraints
around using `filteredTableData` directly, we fixed the problem by
adding a new property to `editableCellValue` object called
`__originalIndex__`.
* This property stores the index of the row being edited in
`processedTableData`
* On top of this change, the PR adds a migration for updating the
current row binding in TableWidgetV2, ensuring accurate current row
calculation and improving the functionality of the widget.
* We also added unit test for migration changes.
* Additionally, This pull request refactors the DSLs for TableWidgetV2
migration test cases to update the DSLs to separate folder, drastically
reducing the file size to its core logic, improving the readability of
the code.
* We also updated relevant test cases to account for this change.
[Testing
plan](https://www.notion.so/appsmith/Issue-34346-currentRow-doesn-t-work-correctly-when-the-table-is-filtered-449225ae822c485493036599c2b19487)
[Counter part EE
pr](https://github.com/appsmithorg/appsmith-ee/pull/4879)
Fixes#34346
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags="@tag.All"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢🟢🟢 All cypress tests have passed! 🎉🎉🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/10451549845>
> Commit: d1d65c6898c223bf3f6dfbfe93b8e8de214fcc7d
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10451549845&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Mon, 19 Aug 2024 11:15:04 UTC
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [x] Yes
- [ ] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary by CodeRabbit
- **New Features**
- Updated DSL migration process to support version 90, enhancing
compatibility and robustness.
- Introduced new migration logic for table widget data bindings,
improving inline editing capabilities.
- Enhanced validation logic for editable cells in table widgets,
allowing for more dynamic data handling.
- Added a method to discard edits in specific table cells, improving
user interaction.
- Introduced a new message constant for required fields, enhancing user
feedback.
- **Bug Fixes**
- Improved validation checks for table cells based on updated indices
and values.
- **Tests**
- Added comprehensive tests to validate migration functions related to
Table Widget, ensuring all aspects function correctly post-update.
- Enhanced test specifications for improved validation logic and
coverage in table widget functionalities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: sneha122 <sneha@appsmith.com>