ng-select2-component 17.2.8 → 17.2.10
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.
- package/AUTHORS.md +1 -0
- package/CHANGELOG.md +15 -0
- package/README.md +40 -5
- package/fesm2022/ng-select2-component.mjs +145 -108
- package/fesm2022/ng-select2-component.mjs.map +1 -1
- package/lib/select2-utils.d.ts.map +1 -1
- package/lib/select2.component.d.ts +8 -0
- package/lib/select2.component.d.ts.map +1 -1
- package/package.json +3 -2
package/AUTHORS.md
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog of ng-select2
|
|
2
2
|
|
|
3
|
+
## V17.2.10 (2026-03-05)
|
|
4
|
+
|
|
5
|
+
> Added near-complete code coverage with Vitest.\
|
|
6
|
+
> Some of the code has been fixed (dead code, untestable code, etc.).
|
|
7
|
+
|
|
8
|
+
### Change
|
|
9
|
+
|
|
10
|
+
- fix: improve the destruction of the component
|
|
11
|
+
|
|
12
|
+
## V17.2.9 (2026-03-05)
|
|
13
|
+
|
|
14
|
+
### Change
|
|
15
|
+
|
|
16
|
+
- feat: include placeholder for auto create input #93 (thanks @shoboske)
|
|
17
|
+
|
|
3
18
|
## V17.2.8 (2025-12-10)
|
|
4
19
|
|
|
5
20
|
### Change
|
package/README.md
CHANGED
|
@@ -13,12 +13,10 @@ npm i ng-select2-component --save
|
|
|
13
13
|
## Requirements
|
|
14
14
|
|
|
15
15
|
- peerDependencies:
|
|
16
|
-
|
|
17
16
|
- `angular` `^18.1.0` to `^21.0.0`
|
|
18
17
|
- `angular/cdk` `^18.1.0` to `^21.0.0`
|
|
19
18
|
|
|
20
19
|
- dependencies (include):
|
|
21
|
-
|
|
22
20
|
- `ngx-infinite-scroll` `^19.0.0` to `^21.0.0`
|
|
23
21
|
|
|
24
22
|
### Notes
|
|
@@ -66,6 +64,8 @@ npm i ng-select2-component --save
|
|
|
66
64
|
|
|
67
65
|
### example
|
|
68
66
|
|
|
67
|
+
#### TS
|
|
68
|
+
|
|
69
69
|
```ts
|
|
70
70
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
71
71
|
|
|
@@ -80,8 +80,25 @@ import { Select2, Select2Hint, Select2Label } from 'ng-select2-component';
|
|
|
80
80
|
class MyComponent {}
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
+
#### HTML template
|
|
84
|
+
|
|
83
85
|
```html
|
|
84
|
-
<select2 [data]="data" [value]="value" (update)="update($event)"
|
|
86
|
+
<select2 [data]="data" [value]="value" (update)="update($event)"></select2>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
or
|
|
90
|
+
|
|
91
|
+
```html
|
|
92
|
+
<ng-select2 [data]="data" [value]="value" (update)="update($event)" />
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
or
|
|
96
|
+
|
|
97
|
+
```html
|
|
98
|
+
<ng-select2 [data]="data" [value]="value" (update)="update($event)">
|
|
99
|
+
<ng-select2-label>label</ng-select2-label>
|
|
100
|
+
<ng-select2-hint>hint</ng-select2-hint>
|
|
101
|
+
</ng-select2>
|
|
85
102
|
```
|
|
86
103
|
|
|
87
104
|
### properties and events of the component
|
|
@@ -452,17 +469,35 @@ It's possible to change different colors (and more) with CSS variables without h
|
|
|
452
469
|
|
|
453
470
|
## Publishing the library
|
|
454
471
|
|
|
455
|
-
```
|
|
472
|
+
```sh
|
|
456
473
|
npm run build:lib
|
|
457
474
|
npm run publish:lib
|
|
458
475
|
```
|
|
459
476
|
|
|
460
477
|
## Update Demo
|
|
461
478
|
|
|
462
|
-
```
|
|
479
|
+
```sh
|
|
463
480
|
npm run build:demo
|
|
464
481
|
```
|
|
465
482
|
|
|
483
|
+
## Tests
|
|
484
|
+
|
|
485
|
+
```sh
|
|
486
|
+
# run tests
|
|
487
|
+
npm run test
|
|
488
|
+
npm run test:vitest
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
```sh
|
|
492
|
+
# run tests with coverage
|
|
493
|
+
npm run test:vitest:coverage
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
```sh
|
|
497
|
+
# run tests with watch
|
|
498
|
+
npm run test:vitest:watch
|
|
499
|
+
```
|
|
500
|
+
|
|
466
501
|
## License
|
|
467
502
|
|
|
468
503
|
Like Angular, this module is released under the permissive MIT license. Your contributions are always welcome.
|