Skip to content

Commit

Permalink
Fix select all checkbox is not checked when all items are checked
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Jul 5, 2024
1 parent 74a6dbb commit 6d0edab
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 6d0edab

Please sign in to comment.