atom-select-list
Advanced tools
Comparing version 0.0.12 to 0.0.13
{ | ||
"name": "atom-select-list", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "A general-purpose select list for use in Atom packages", | ||
@@ -5,0 +5,0 @@ "main": "./src/select-list-view.js", |
@@ -304,4 +304,4 @@ /** @babel */ | ||
} else { | ||
if (this.props.didCancelSelection) { | ||
this.props.didCancelSelection() | ||
if (this.props.didConfirmEmptySelection) { | ||
this.props.didConfirmEmptySelection() | ||
} | ||
@@ -308,0 +308,0 @@ } |
@@ -156,2 +156,3 @@ /** @babel */ | ||
it('confirming an empty selection', async () => { | ||
let emptySelectionConfirmEventsCount = 0 | ||
let selectionCancelEventsCount = 0 | ||
@@ -166,2 +167,3 @@ const selectionConfirmEvents = [] | ||
didConfirmSelection: (item) => { selectionConfirmEvents.push(item) }, | ||
didConfirmEmptySelection: (item) => { emptySelectionConfirmEventsCount++ }, | ||
didCancelSelection: () => { selectionCancelEventsCount++ }, | ||
@@ -177,5 +179,5 @@ filterKeyForItem: (item) => item.name | ||
assert.deepEqual(selectionConfirmEvents, []) | ||
assert.equal(selectionCancelEventsCount, 1) | ||
assert.equal(selectionCancelEventsCount, 0) | ||
assert.equal(emptySelectionConfirmEventsCount, 1) | ||
selectionCancelEventsCount = 0 | ||
selectListView.reset() | ||
@@ -187,3 +189,3 @@ await selectListView.update({items: []}) | ||
assert.deepEqual(selectionConfirmEvents, []) | ||
assert.equal(selectionCancelEventsCount, 1) | ||
assert.equal(emptySelectionConfirmEventsCount, 2) | ||
}) | ||
@@ -190,0 +192,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25604
656