bito-code-review[bot] commented on code in PR #37304:
URL: https://github.com/apache/superset/pull/37304#discussion_r2743333889


##########
superset-frontend/src/components/ListView/ListView.tsx:
##########
@@ -463,8 +469,8 @@ export function ListView<T extends object = any>({
                     current={pageIndex + 1}
                     pageSize={pageSize}
                     total={count}
-                    onChange={page => {
-                      gotoPage(page - 1);
+                    onChange={(page: number) => {
+                      setPage(page);
                     }}

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Broken pagination logic</b></div>
   <div id="fix">
   
   The pagination onChange in card view now sets local state but doesn't update 
the page index, breaking pagination. It should call gotoPage to trigger data 
fetching.
   </div>
   
   
   <details>
   <summary>
   <b>Code suggestion</b>
   </summary>
   <blockquote>Check the AI-generated fix before applying</blockquote>
   <div id="code">
   
   
   ````suggestion
                       onChange={page => {
                         gotoPage(page - 1);
                       }}
   ````
   
   </div>
   </details>
   
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #03dae4</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to