Skip to content

Commit

Permalink
Merge pull request #44882 from nkdengineer/fix/44801
Browse files Browse the repository at this point in the history
[CP Staging] Fix select all checkbox is not checked when all items are checked
  • Loading branch information
mountiny authored Jul 5, 2024
2 parents 9d4cae0 + 6d0edab commit 87f5cdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function BaseSelectionList<TItem extends ListItem>(
itemLayouts.push({length: fullItemHeight, offset});
offset += fullItemHeight;

if (item.isSelected && !selectedOptions.find((option) => option.text === item.text)) {
if (item.isSelected && !selectedOptions.find((option) => option.keyForList === item.keyForList)) {
selectedOptions.push(item);
}
});
Expand Down
1 change: 1 addition & 0 deletions src/libs/SearchUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ function getReportSections(data: OnyxTypes.SearchResults['data'], metadata: Onyx

reportIDToTransactions[reportKey] = {
...value,
keyForList: value.reportID,
from: data.personalDetailsList?.[value.accountID],
to: data.personalDetailsList?.[value.managerID],
transactions,
Expand Down

0 comments on commit 87f5cdd

Please sign in to comment.