stimulus-library 0.9.10 → 0.9.11
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.
|
@@ -7,11 +7,23 @@ export declare class SignalInputController extends BaseController {
|
|
|
7
7
|
static values: {
|
|
8
8
|
name: StringConstructor;
|
|
9
9
|
debounceInterval: NumberConstructor;
|
|
10
|
+
triggerChange: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
triggerInput: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
10
18
|
};
|
|
11
19
|
debounceIntervalValue: number;
|
|
12
20
|
readonly hasDebounceIntervalValue: boolean;
|
|
13
21
|
nameValue: string;
|
|
14
22
|
hasNameValue: boolean;
|
|
23
|
+
triggerChangeValue: boolean;
|
|
24
|
+
readonly hasTriggerChangeValue: boolean;
|
|
25
|
+
triggerInputValue: boolean;
|
|
26
|
+
readonly hasTriggerInputValue: boolean;
|
|
15
27
|
get _debounceTimeout(): number | null;
|
|
16
28
|
get _name(): string;
|
|
17
29
|
connect(): void;
|
|
@@ -8,6 +8,14 @@ export class SignalInputController extends BaseController {
|
|
|
8
8
|
static values = {
|
|
9
9
|
name: String,
|
|
10
10
|
debounceInterval: Number,
|
|
11
|
+
triggerChange: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false,
|
|
14
|
+
},
|
|
15
|
+
triggerInput: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false,
|
|
18
|
+
},
|
|
11
19
|
};
|
|
12
20
|
get _debounceTimeout() {
|
|
13
21
|
return this.hasDebounceIntervalValue ? this.debounceIntervalValue : 1;
|
|
@@ -47,5 +55,11 @@ export class SignalInputController extends BaseController {
|
|
|
47
55
|
else {
|
|
48
56
|
this.el.value = value;
|
|
49
57
|
}
|
|
58
|
+
if (this.triggerChangeValue) {
|
|
59
|
+
this.dispatchEvent(this.el, 'change');
|
|
60
|
+
}
|
|
61
|
+
if (this.triggerInputValue) {
|
|
62
|
+
this.dispatchEvent(this.el, 'change');
|
|
63
|
+
}
|
|
50
64
|
}
|
|
51
65
|
}
|