Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

Commit d198cb1

Browse files
author
clivezhg
committed
Version 1.0.0 (CSS fix, README update)
1 parent b814e3f commit d198cb1

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ Constraints
9292
- AJAX data source is not supported.
9393
- It is a little slower than plain Select2, because there are extra operations to do. Anyway, according to my test (you can check "Example 3" in "example/example.html", click the "India -> north"), 1500 options is basically acceptable, which is enough in most of the real world cases.
9494

95+
Illustration
96+
------------
97+
"Example 3" in "example/example.html":
98+
99+
<img src="https://cloud.githubusercontent.com/assets/22025586/24068585/aa8c2294-0bcd-11e7-926f-db7dd34b50dd.png">
100+
101+
95102
Copyright and license
96103
---------------------
97104
The license is available within the repository in the [LICENSE][license] file.

src/select2totree.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,23 @@
4141

4242
.s2-to-tree li.select2-results__option.non-leaf .expand-collapse:hover {
4343
color: red;
44+
cursor: pointer;
4445
}
45-
.s2-to-tree li.select2-results__option.non-leaf .expand-collapse:before { /* IE8 doesn't support :: */
46+
.s2-to-tree li.select2-results__option.non-leaf .expand-collapse:before { /* no :: in IE8 */
4647
content: "+";
4748
position: absolute;
4849
left: -0.35em;
4950
top: 0.1em;
5051
font-size: larger;
51-
cursor: pointer;
5252
}
5353
.s2-to-tree li.select2-results__option.non-leaf.opened .expand-collapse:before {
5454
content: "−";
5555
}
5656

57+
.s2-to-tree .select2-results__option[aria-disabled="true"] .expand-collapse {
58+
color: black;
59+
}
60+
5761
.s2-to-tree .item-label {
5862
display: inline-block;
5963
margin-left: 0.5em;
@@ -83,6 +87,7 @@
8387
.s2-to-tree.select2-container li.select2-results__option[aria-selected="true"] > span.item-label {
8488
background-color: #ddd;
8589
}
90+
8691
.s2-to-tree.select2-container li.select2-results__option--highlighted[aria-selected],
8792
.s2-to-tree.select2-container li.select2-results__option[aria-selected="true"] {
8893
background-color: inherit;

0 commit comments

Comments
 (0)