dosubot[bot] commented on issue #36267:
URL: https://github.com/apache/superset/issues/36267#issuecomment-3576438728

   <!-- Greeting -->
   Hi @durban77! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.
   
   <!-- Answer -->
   You’re correct—DrillDetailTable always fetches and displays 50 rows per 
page, but the Table UI lets users pick other page sizes (like 5, 15, 25, 100), 
which causes bugs: selecting a different size either overreads results or only 
shows 50 rows regardless of the selection. This happens because the backend and 
cache logic are hardcoded to use PAGE_SIZE = 50, while the Table component 
defaults to pageSizeOptions = ['5', '15', '25', '50', '100'] and exposes the 
selector in the UI. The Table’s pagination handler doesn’t actually update the 
backend page size, so the UI and data get out of sync 
([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx#L56-L314)).
   
   Setting `pageSizeOptions={['50']}` is a safe immediate fix—it removes the 
misleading selector and aligns the UI with what the backend supports 
([source](https://github.com/apache/superset-frontend/packages/superset-ui-core/src/components/Table/index.tsx#L254-L369)).
 If you want users to be able to pick other page sizes, you’d need to refactor 
the DrillDetailPane logic to propagate the selected page size into the API call 
and cache logic, so the backend actually fetches the right number of rows per 
page.
   
   No recent changes or planned fixes for this in master, and similar issues 
have been reported in other table visualizations. Your proposed adjustment is 
the right move unless/until variable page sizes are supported in the backend.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/d20aa108-2751-43a0-ba56-0471bd3697e2?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/d20aa108-2751-43a0-ba56-0471bd3697e2?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/d20aa108-2751-43a0-ba56-0471bd3697e2?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/d20aa108-2751-43a0-ba56-0471bd3697e2?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/d20aa108-2751-43a0-ba56-0471bd3697e2?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/d20aa108-2751-43a0-ba56-0471bd3697e2?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/d20aa108-2751-43a0-ba56-0471bd3697e2?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%E2%80%99re%20correct%E2%80%94DrillDetailTable%20always%20fetches%20and%20displays%2050%20rows%20per%20page%2C%20but%20the%20Table%20UI%20lets%20users%20pick%20other%20page%20sizes%20%28like%205%2C%2015%2C%2025%2C%20100%29%2C%20which%20causes%20bugs%3A%20selecting%20a%20different%20size%20either%20overreads%20results%20or%20only%20shows%2050%20rows%20regardless%20of%20the%20selection.%20This%20happens%20because%20the%20backend%20and%20cache%20logic%20are%20hardcoded%20to%20use%20PAGE_SIZE%20%3D%2050%2C%20while%20the%20Table%20component%20defaults%20to%20pageSizeOptions%20%3D%20%5B%275%27%2C%20%2715%27%2C%20%2725%27%2C%20%2750%27%2C%20%27100%27%5D%20and%20exposes%20the%20selector%20in%20the%20UI.%20The%20Table%E2%80%99s%20pagination%20handler%20d
 
oesn%E2%80%99t%20actually%20update%20the%20backend%20page%20size%2C%20so%20the%20UI%20and%20data%20get%20out%20of%20sync%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.tsx%23L56-L314%29%29.%0A%0ASetting%20%60pageSizeOptions%3D%7B%5B%2750%27%5D%7D%60%20is%20a%20safe%20immediate%20fix%E2%80%94it%20removes%20the%20misleading%20selector%20and%20aligns%20the%20UI%20with%20what%20the%20backend%20supports%20%28%5Bsource%5D%28https%3A//github.com/apache/superset-frontend/packages/superset-ui-core/src/components/Table/index.tsx%23L254-L369%29%29.%20If%20you%20want%20users%20to%20be%20able%20to%20pick%20other%20page%20sizes%2C%20you%E2%80%99d%20need%20to%20refactor%20the%20DrillDetailPane%20logic%20to%20propagate%20the%20selected%20page%20size%20into%20the%20API%20call%20and%20cache%20logic%2C%20so%20the%20backend%20actually%20fetches%20the%20right%20number%20of%20rows%20
 
per%20page.%0A%0ANo%20recent%20changes%20or%20planned%20fixes%20for%20this%20in%20master%2C%20and%20similar%20issues%20have%20been%20reported%20in%20other%20table%20visualizations.%20Your%20proposed%20adjustment%20is%20the%20right%20move%20unless/until%20variable%20page%20sizes%20are%20supported%20in%20the%20backend.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36267)


-- 
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