fix: update visibility condition for infinite scroll in TableWidgetV2 (#40474)
## Description Updated the 'hidden' property in the TableWidgetV2 configuration to account for both the INFINITE_SCROLL_ENABLED feature flag and the serverSidePaginationEnabled prop, ensuring proper visibility control based on these conditions. Fixes #40409 _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.Table" ### 🔍 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/14733305658> > Commit: cba8275ab184bc9c3c8e0a54c54994e3409b9c98 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14733305658&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Table` > Spec: > <hr>Tue, 29 Apr 2025 16:01:26 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Updated the visibility logic for the infinite scroll option in table pagination settings to better reflect feature availability and widget configuration. - **Tests** - Enhanced test coverage by enabling server-side pagination alongside infinite scroll in table widget scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
5f534d1e93
commit
557ee052f0
|
|
@ -43,6 +43,7 @@ describe(
|
|||
|
||||
propPane.EnterJSContext("Table data", JSON.stringify(testData));
|
||||
|
||||
propPane.TogglePropertyState("Server side pagination", "On");
|
||||
propPane.TogglePropertyState("Infinite scroll", "On");
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ describe(
|
|||
|
||||
it("1. should enable infinite scroll and verify records are loaded automatically when scrolling", () => {
|
||||
// Enable infinite scroll in the property pane
|
||||
propPane.TogglePropertyState("Server side pagination", "On");
|
||||
propPane.TogglePropertyState("Infinite scroll", "On");
|
||||
|
||||
// Wait for network call to complete
|
||||
|
|
|
|||
|
|
@ -200,8 +200,10 @@ export default [
|
|||
updateCellEditabilityOnInfiniteScrollChange,
|
||||
updateSearchSortFilterOnInfiniteScrollChange,
|
||||
]),
|
||||
dependencies: ["primaryColumns"],
|
||||
hidden: () => !Widget.getFeatureFlag(INFINITE_SCROLL_ENABLED),
|
||||
dependencies: ["primaryColumns", "serverSidePaginationEnabled"],
|
||||
hidden: (props: TableWidgetProps) =>
|
||||
!Widget.getFeatureFlag(INFINITE_SCROLL_ENABLED) ||
|
||||
!props.serverSidePaginationEnabled,
|
||||
},
|
||||
{
|
||||
helpText: createMessage(TABLE_WIDGET_TOTAL_RECORD_TOOLTIP),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user