Skip to content

Commit

Permalink
fix: handle deselection of existing field (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
miralemd committed Dec 4, 2019
1 parent ed7e9df commit f5e6318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apis/nucleus/src/components/selections/OneField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ export default function OneField({ field, api, stateIx = 0, skipHandleShowListBo
const numSelected = counts.qSelected + counts.qSelectedExcluded + counts.qLocked + counts.qLockedExcluded;
// Maintain modal state in app selections
const noSegments = numSelected === 0 && selection.qTotal === 0;
let label = ' '; // FIXME translate
let label = '';
if (selection.qTotal === numSelected && selection.qTotal > 1) {
label = translator.get('CurrentSelections.All');
} else if (numSelected > 1 && selection.qTotal) {
label = translator.get('CurrentSelections.Of', [numSelected, selection.qTotal]);
} else {
} else if (selection.qSelectedFieldSelectionInfo) {
label = selection.qSelectedFieldSelectionInfo.map(v => v.qName).join(', ');
}
if (field.states[stateIx] !== '$') {
Expand Down

0 comments on commit f5e6318

Please sign in to comment.