## Description
This PR implements the following changes:
- Move the drag events from the Parent component's useEffect to the
`HeaderCell` component.
- Refactored the code. Inside the table component, we refactored the
code such that when SSP is disabled the component uses `StaticTable` and
when SSP enabled then we use `VirtualTable`.
- It also includes the fix for the following issue. Whenever the user
has a scroll to the bottom of the page, on clicking of add new button it
is expected that the scroll should move to the top but it wasn't
happening.
> Add a TL;DR when description is extra long (helps content team)
Fixes#20858
> if no issue exists, please create an issue and ask the maintainers
about this first
## Type of change
- Bug fix (non-breaking change which fixes an issue)
## How Has This Been Tested?
- Manual
- Test cases:
- Column name should appear on update from the property pane
- reorder whenever SSP is enabled
- On column re-size
- When a col is frozen
- When a col is unfrozen
- When all the headers or one of them is removed
- When sorted also should work
- Enable multi-row selection
- When in preview mode and back and forth(Check the above cases)
- When in Deployed mode
- Dragging of columns from the column header should work as expected
both in Deploy and Published mode.
- Cypress
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
**PRD**:
https://www.notion.so/appsmith/Ability-to-freeze-columns-dd118f7ed2e14e008ee305056b79874a?d=300f4968889244da9f737e1bfd8c06dc#2ddaf28e10a0475cb69f1af77b938d0b
This PR adds the following features to the table widget:
- Freeze the columns to the left or right of the table.(Both canvas and
page view mode).
- Unfreeze the frozen columns. (Both canvas and page view mode).
- Columns that are left frozen, will get unfrozen at a position after
the last left frozen column. (Both canvas and page view mode).
- Columns that are right frozen, will get unfrozen at a position before
the first right frozen column. (Both canvas and page view mode).
- Column order can be persisted in the Page view mode.
- Users can also unfreeze the columns that are frozen by the developers.
- Columns that are frozen cannot be reordered(Both canvas and page view
mode)
- **Property pane changes (Columns property)**:
- If the column is frozen to the left then that column should appear at
top of the list.
- If the column is frozen to the right then that column should appear at
the bottom of the list.
- The columns that are frozen cannot be moved or re-ordered in the list.
They remain fixed in their position.
- In-Page mode, If there is a change in frozen or unfrozen columns in
multiple tables then the order of columns and frozen and unfrozen
columns should get persisted on refresh i.e. changes should get
persisted across refreshes.
- Integrates Date picker component inside table's date column
- Enables edit mode for date type column in table widget
- Adds all the required Property controls for date picker
- Builds the user flow for date column editing in table widget
* feat: Autoassigns column datatype in table widget
- Limited to only number, string and boolean datatypes
* Review changes
Adjust jest tests accordingly
* Adds support for recognising Date type columns
Review changes
* Adds jest test for Date field
* Fix warning
* Adjust cypress tests and add helper method to account for code changes
* Fix failing test