PromucFlow_constructor/app/client
Rahul Barwal 6c8b040033
fix: Enhanced offline data handling capabilities for the data table when infinite scroll is enabled. (#40632)
## Description
<ins>Problem</ins>  
Table failed to load data for a page when network or query failures
occurred with infinite scroll enabled.

<ins>Root cause</ins>  
There was no fallback or handling mechanism for offline scenarios or
query failures, causing the table to enter an unusable state.

<ins>Solution</ins>  
This PR handles enhancing offline data handling for the table when
infinite scroll is enabled.
We ensure that a data fetch request for the next page is triggered
regardless of the scenario.

* For example, if we are on page 2 and attempt to navigate to page 3,
but the network request fails due to being offline or a timeout, we
recognize that we lack data for page 3. If the user reverse scrolls and
then resumes scrolling toward page 3, we will issue a new request.
* This process relies on accurately tracking the current page and the
user's scrolling intent, while also checking the data we have already
received.

Fixes #40579
_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/15011754024>
> Commit: 9c48e7cd795cfa6e10f35151a46fa62c42be0e0f
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=15011754024&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Table`
> Spec:
> <hr>Wed, 14 May 2025 04:22:05 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

## Summary by CodeRabbit

- **New Features**
- Improved infinite scroll in tables with enhanced data caching,
reducing redundant data requests and improving performance during
pagination.
- Table components now leverage cached data for smoother scrolling and
more efficient page loading.
- **Performance**
- Optimized table rendering to prevent unnecessary re-renders when
cached data remains unchanged.
- **Bug Fixes**
- Prevented updates to end-of-data status when offline, avoiding
incorrect data state during connectivity issues.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-14 12:01:14 +05:30
..
.husky chore: adds depandabot.yml (#40521) 2025-05-01 05:44:04 +00:00
.yarn
config fix: sourcemaps (#39301) 2025-02-16 20:05:50 +03:00
cypress ci: Fixing partial export spec (#40611) 2025-05-08 17:22:05 +05:30
docker/templates
generators
packages chore: Add chat widget migration (#40635) 2025-05-12 17:12:11 +05:30
public chore: add maximum-scale to avoid zoom on inputs in iOS (#40171) 2025-04-08 19:16:31 +05:30
scripts chore: Eject CRA (#39264) 2025-02-14 14:24:41 +05:30
src fix: Enhanced offline data handling capabilities for the data table when infinite scroll is enabled. (#40632) 2025-05-14 12:01:14 +05:30
test Merge branch 'feat/reactive-actions-run-behaviour' of https://github.com/appsmithorg/appsmith into feat/reactive-actions-run-behaviour 2025-05-02 18:32:00 +05:30
typings
.babelrc chore: Eject CRA (#39264) 2025-02-14 14:24:41 +05:30
.dockerignore
.editorconfig
.eslintrc.base.json
.eslintrc.js
.fork-ts-checkerrc
.gitignore
.lintstagedrc.json chore: update import of AppState to DefaultReduxState (#40494) 2025-05-01 15:53:37 +05:30
.nvmrc
.prettierignore
.prettierrc
.sentryclirc
.yarnrc.yml
build.sh fix: sourcemaps (#39301) 2025-02-16 20:05:50 +03:00
cypress_ci_custom.config.ts
cypress_ci_hosted.config.ts
cypress_ci.config.ts
cypress-add-tags.js
cypress.config.ts
download-assets.js
jest.config.js
knip.json chore: Eject CRA (#39264) 2025-02-14 14:24:41 +05:30
package.json chore: update import of AppState to DefaultReduxState (#40494) 2025-05-01 15:53:37 +05:30
README.md
README.old.md
start-caddy.sh
start-https.sh chore: convert consolidated api etag to a weak one (#38939) 2025-01-31 16:35:20 +05:30
tailwind.config.js
tsconfig.json
tsconfig.path.json
vercel.json
yarn.lock chore: downgrade tinymce from 7.7.1 to 6.8.3 in package.json (#40465) 2025-04-29 10:24:01 +05:30

Appsmith Client

This project was bootstrapped with Create React App.

For details on setting up your development machine, please refer to the Setup Guide