Browse Source

update name & TODO description

namnguyen 9 months ago
parent
commit
bdfe63b332

+ 1 - 1
frontend/taipy-gui/src/components/Taipy/PaginatedTable.spec.tsx

@@ -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(() => {

+ 5 - 1
frontend/taipy-gui/src/components/Taipy/PaginatedTable.tsx

@@ -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) {