clear selected ids when panel is closed

This commit is contained in:
Riley Davis
2017-06-05 14:40:03 -06:00
parent 39d8a5d01b
commit c4a41af33b
3 changed files with 8 additions and 1 deletions
@@ -67,7 +67,9 @@ export default function moderation (state = initialState, action) {
case actions.VIEW_USER_DETAIL:
return state.set('userDetailId', action.userId);
case actions.HIDE_USER_DETAIL:
return state.set('userDetailId', null);
return state
.set('userDetailId', null)
.update('userDetailSelectedIds', (set) => set.clear());
case actions.CHANGE_USER_DETAIL_STATUSES:
return state
.set('userDetailActiveTab', action.tab)
@@ -75,6 +75,7 @@ const Comment = ({
{
minimal && typeof selected === 'boolean' && typeof toggleSelect === 'function' && (
<input
className={styles.bulkSelectInput}
type='checkbox'
value={comment.id}
checked={selected}
@@ -463,3 +463,7 @@ span {
.minimalSelection {
background-color: #ecf4ff;
}
.bulkSelectInput {
cursor: pointer;
}