mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix tailCount renderering in removeItemsDialog (#2148)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
f4a3074926
commit
8d74f1c759
@ -282,8 +282,8 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
||||
const dialogCustomProps = customizeRemoveDialog ? customizeRemoveDialog(selectedItems) : {};
|
||||
const selectedCount = selectedItems.length;
|
||||
const tailCount = selectedCount > visibleMaxNamesCount ? selectedCount - visibleMaxNamesCount : 0;
|
||||
const tail = tailCount > 0 ? "and <b>{tailCount}</b> more" : null;
|
||||
const message = selectedCount <= 1 ? <p>Remove item <b>{selectedNames}</b>?</p> : <p>Remove <b>{selectedCount}</b> items <b>{selectedNames}</b> {tail}?</p>;
|
||||
const tail = tailCount > 0 ? <>, and <b>{tailCount}</b> more</> : null;
|
||||
const message = selectedCount <= 1 ? <p>Remove item <b>{selectedNames}</b>?</p> : <p>Remove <b>{selectedCount}</b> items <b>{selectedNames}</b>{tail}?</p>;
|
||||
|
||||
ConfirmDialog.open({
|
||||
ok: removeSelectedItems,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user