Skip to content

Commit 4202264

Browse files
committed
Implementing checkboxes in group tree view for group selection.
1 parent cb9bf76 commit 4202264

File tree

5 files changed

+271
-174
lines changed

5 files changed

+271
-174
lines changed

src/components/Groups/GroupsTreeView/GroupsTreeList.js

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,31 @@ import PropTypes from 'prop-types';
33

44
import GroupsTreeNode from './GroupsTreeNode.js';
55

6-
const GroupsTreeList = React.memo(({ groups, isExpanded = false, addAttribute, removeAttribute, locale }) => (
7-
<ul className="groupTree nav flex-column">
8-
{groups.map(group => (
9-
<GroupsTreeNode
10-
key={group.id}
11-
group={group}
12-
isExpanded={isExpanded}
13-
addAttribute={addAttribute}
14-
removeAttribute={removeAttribute}
15-
locale={locale}
16-
/>
17-
))}
18-
</ul>
19-
));
6+
const GroupsTreeList = React.memo(
7+
({ groups, checkboxes, checked, setChecked, isExpanded = false, addAttribute, removeAttribute, locale }) => (
8+
<ul className="groupTree nav flex-column">
9+
{groups.map(group => (
10+
<GroupsTreeNode
11+
key={group.id}
12+
group={group}
13+
isExpanded={isExpanded}
14+
addAttribute={addAttribute}
15+
removeAttribute={removeAttribute}
16+
locale={locale}
17+
checkboxes={checkboxes}
18+
checked={checked}
19+
setChecked={setChecked}
20+
/>
21+
))}
22+
</ul>
23+
)
24+
);
2025

2126
GroupsTreeList.propTypes = {
2227
groups: PropTypes.array.isRequired,
28+
checkboxes: PropTypes.func,
29+
checked: PropTypes.object,
30+
setChecked: PropTypes.func,
2331
isExpanded: PropTypes.bool,
2432
addAttribute: PropTypes.func,
2533
removeAttribute: PropTypes.func,

0 commit comments

Comments
 (0)