mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
Revert "FIX: ensures onSelect/onDeselect are called"
This reverts commit 52eed73294
.
This commit is contained in:
parent
7f420b61cb
commit
2ff2c49908
@ -210,10 +210,6 @@ export default SelectKitComponent.extend({
|
||||
},
|
||||
|
||||
select(computedContentItem) {
|
||||
if (this.get("hasSelection")) {
|
||||
this.deselect(this.get("selection.value"));
|
||||
}
|
||||
|
||||
if (
|
||||
!computedContentItem ||
|
||||
computedContentItem.__sk_row_type === "noneRow"
|
||||
|
@ -835,55 +835,3 @@ componentTest("without forceEscape", {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
componentTest("onSelect", {
|
||||
template:
|
||||
"<div class='test-external-action'></div>{{single-select content=content onSelect=(action externalAction)}}",
|
||||
|
||||
beforeEach() {
|
||||
this.set("externalAction", actual => {
|
||||
find(".test-external-action").text(actual);
|
||||
});
|
||||
|
||||
this.set("content", ["red", "blue"]);
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.get("subject").selectRowByValue("red");
|
||||
|
||||
assert.equal(
|
||||
find(".test-external-action")
|
||||
.text()
|
||||
.trim(),
|
||||
"red"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
componentTest("onDeselect", {
|
||||
template:
|
||||
"<div class='test-external-action'></div>{{single-select content=content onDeselect=(action externalAction)}}",
|
||||
|
||||
beforeEach() {
|
||||
this.set("externalAction", actual => {
|
||||
find(".test-external-action").text(actual);
|
||||
});
|
||||
|
||||
this.set("content", ["red", "blue"]);
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
await this.get("subject").expand();
|
||||
await this.get("subject").selectRowByValue("red");
|
||||
await this.get("subject").expand();
|
||||
await this.get("subject").selectRowByValue("blue");
|
||||
|
||||
assert.equal(
|
||||
find(".test-external-action")
|
||||
.text()
|
||||
.trim(),
|
||||
"red"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user