Skip to content

Commit

Permalink
#152 - Fix QA issue
Browse files Browse the repository at this point in the history
of needing to click select all twice on page 2 and beyond.
Default to NONE_SELECTED on new page open
  • Loading branch information
Suhas Vishwanath committed Sep 25, 2023
1 parent b97aa81 commit ce722a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/components/ImageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export default function ImageList() {

const toggleCheckAllImagesInCurrentPage = () => {
setSelectAllInPage((oldValue: any) => {
const currentValue = oldValue[currentPage];
const currentValue = oldValue[currentPage] || NONE_SELECTED;
const nextValue = (currentValue === NONE_SELECTED || currentValue === SOME_SELECTED) ? ALL_SELECTED: NONE_SELECTED;
return {...oldValue, [currentPage]: nextValue}
});
Expand Down

0 comments on commit ce722a5

Please sign in to comment.