anchor_view_components 0.34.0 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/components/anchor/typeahead_select_controller.ts +10 -1
- data/lib/anchor/view_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9b25030c275ae49c959a38c97f01a402ec50187a959d47da7f56991460f1634
|
|
4
|
+
data.tar.gz: 5e6b00a0b509ac178df6e1a4cdfe9df858bd9449a07ee3a38c48a31d1ec85ac4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 263b68a6a485e0eed84164544b9529023c53f16c9aa45782a2993c97ecf99ada4c1343ce01474b812e0297349cc700f4bf5dd7c4b5e9f72677a56b97510c4f89
|
|
7
|
+
data.tar.gz: b1b87849037d8bc09452493e16a53bba369125d8793adbc23f1146aa5779c55a963fbe8da43f0a487da450579b1640987b88e3382fe75283bee47b0e01634e9e
|
data/CHANGELOG.md
CHANGED
|
@@ -3,10 +3,19 @@ import Choices from "choices.js";
|
|
|
3
3
|
|
|
4
4
|
export default class extends Controller<HTMLSelectElement> {
|
|
5
5
|
initialize(): void {
|
|
6
|
-
new Choices(this.element, {
|
|
6
|
+
const choices = new Choices(this.element, {
|
|
7
7
|
allowHTML: false,
|
|
8
8
|
removeItemButton: this.element.multiple,
|
|
9
9
|
itemSelectText: "",
|
|
10
10
|
});
|
|
11
|
+
|
|
12
|
+
const form = this.element.closest("form");
|
|
13
|
+
|
|
14
|
+
// Choices.js has a bug where the options disappear when the form is reset.
|
|
15
|
+
// More info: https://github.com/Choices-js/Choices/issues/1053
|
|
16
|
+
form?.addEventListener("reset", () => {
|
|
17
|
+
choices.destroy();
|
|
18
|
+
choices.init();
|
|
19
|
+
});
|
|
11
20
|
}
|
|
12
21
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anchor_view_components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.34.
|
|
4
|
+
version: 0.34.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Buoy Software
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-11-
|
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|