Skip to content

Commit

Permalink
update name & TODO description
Browse files Browse the repository at this point in the history
  • Loading branch information
namnguyen20999 committed Aug 5, 2024
1 parent 1695087 commit bdfe63b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ describe("PaginatedTable Component", () => {
type: "SEND_ACTION_ACTION",
});
});
it("should renders correctly when style is applied to columns", async () => {
it("should render correctly when style is applied to columns", async () => {
const dispatch = jest.fn();
const state: TaipyState = INITIAL_STATE;
await waitFor(() => {
Expand Down
6 changes: 5 additions & 1 deletion frontend/taipy-gui/src/components/Taipy/PaginatedTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ const PaginatedTable = (props: TaipyPaginatedTableProps) => {

useDispatchRequestUpdateOnFirstRender(dispatch, id, module, updateVars);

// TODO: unexpected behavior, need to check
/*
TODO: If the 'selected' value is a negative number, it will lead to unexpected pagination behavior.
For instance, if 'selected' is -1, the pagination will display from -99 to 0 and no data will be selected.
Need to fix this issue.
*/
useEffect(() => {
if (selected.length) {
if (selected[0] < startIndex || selected[0] > startIndex + rowsPerPage) {
Expand Down

0 comments on commit bdfe63b

Please sign in to comment.