FIX: improves category/tag drops header shortcuts (#6610)

- wont appear when filtering
- can now be selected with keyboard
- fix bugs on click with safari/firefox
This commit is contained in:
Joffrey JAFFEUX
2018-11-15 15:21:40 +01:00
committed by GitHub
parent fc95f772bc
commit 9911a41f4c
10 changed files with 145 additions and 83 deletions
@@ -887,3 +887,26 @@ componentTest("onDeselect", {
);
}
});
componentTest("noopRow", {
template: "{{single-select value=value content=content}}",
beforeEach() {
this.set("value", "blue");
this.set("content", [
{ id: "red", name: "Red", __sk_row_type: "noopRow" },
"blue",
"green"
]);
},
async test(assert) {
await this.get("subject").expand();
await this.get("subject").selectRowByValue("red");
assert.equal(this.get("value"), "blue", "it doesnt change the value");
await this.get("subject").expand();
await this.get("subject").selectRowByValue("green");
assert.equal(this.get("value"), "green");
}
});
@@ -42,7 +42,7 @@ componentTest("default", {
assert.equal(
this.get("subject")
.rowByIndex(0)
.rowByIndex(1)
.name(),
"jeff",
"it has the correct tag"
@@ -50,7 +50,7 @@ componentTest("default", {
assert.equal(
this.get("subject")
.rowByIndex(1)
.rowByIndex(2)
.name(),
"neil",
"it has the correct tag"
@@ -68,7 +68,7 @@ componentTest("default", {
await this.get("subject").fillInFilter("");
assert.equal(
this.get("subject")
.rowByIndex(0)
.rowByIndex(1)
.name(),
"jeff",
"it returns top tags for an empty search"