File tree 20 files changed +82
-13
lines changed
20 files changed +82
-13
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ function handleInput(e: any) {
22
22
context ?.node .input (props .context ?._value )
23
23
}
24
24
25
+ const handleBlur = (event : Event ) => {
26
+ context ?.handlers .blur (event );
27
+ }
28
+
25
29
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
26
30
</script >
27
31
@@ -37,6 +41,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
37
41
:suggestions =" suggestions"
38
42
@complete =" search"
39
43
@change =" handleInput"
44
+ @blur =" handleBlur"
40
45
/>
41
46
</div >
42
47
</template >
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ function handleInput(e: any) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
18
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
19
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
24
</script >
21
25
@@ -32,6 +36,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
32
36
:input-class =" styleClass"
33
37
:binary =" attrs.binary ?? true"
34
38
@change =" handleInput"
39
+ @blur =" handleBlur"
35
40
/>
36
41
<span v-if =" context.attrs.labelRight" class =" formkit-prime-right" >{{ context.attrs.labelRight }}</span >
37
42
</div >
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ const props = defineProps({
12
12
const context = props .context
13
13
const attrs = computed (() => context ?.attrs )
14
14
15
- function handleInput(e : any ) {
15
+ function handleInput(e : Event ) {
16
16
context ?.node .input (props .context ?._value )
17
- context ?.handlers .blur (props . context ?. _value )
17
+ context ?.handlers .blur (e )
18
18
}
19
19
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
20
</script >
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ const attrs = computed(() => context?.attrs)
15
15
function handleInput(e : any ) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
+
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
18
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
19
24
</script >
20
25
@@ -30,6 +35,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
30
35
:input-style =" attrs.style"
31
36
:input-class =" styleClass"
32
37
@change =" handleInput"
38
+ @blur =' handleBlur'
33
39
/>
34
40
<span v-if =" context.attrs.labelRight" class =" formkit-prime-right" >{{ context.attrs.labelRight }}</span >
35
41
</div >
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ function handleInput(e: any) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
18
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
19
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
24
</script >
21
25
@@ -30,6 +34,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
30
34
:class =" styleClass"
31
35
:unstyled =" attrs.unstyled ?? false"
32
36
@change =" handleInput"
37
+ @blur =" handleBlur"
33
38
/>
34
39
</div >
35
40
</template >
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ const props = defineProps({
12
12
const context = props .context
13
13
const attrs = computed (() => context ?.attrs )
14
14
15
- function handleBlur(e : any ) {
16
- context ?.handlers .blur (e . target . value )
15
+ function handleBlur(e : Event ) {
16
+ context ?.handlers .blur (e )
17
17
}
18
18
19
19
function handleInput(e : any ) {
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ function handleChange(e: any) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
18
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
19
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
24
</script >
21
25
@@ -33,6 +37,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
33
37
:input-class =" styleClass"
34
38
@click =" handleChange"
35
39
@change =" handleChange"
40
+ @blur =" handleChange"
36
41
/>
37
42
<label :for =" option.value" >{{ option.label }}</label >
38
43
</div >
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ function handleInput(e: any) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
18
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
19
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
24
</script >
21
25
@@ -32,6 +36,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
32
36
:off-icon =" attrs.offIcon ?? 'pi pi-star'"
33
37
:cancel =" attrs.cancel ?? false"
34
38
@change =" handleInput"
39
+ @blur =" handleBlur"
35
40
/>
36
41
</div >
37
42
</template >
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ function handleChange(e: any) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
18
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
19
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
24
</script >
21
25
@@ -29,6 +33,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
29
33
:style =" attrs.style"
30
34
:class =" styleClass"
31
35
@change =" handleChange"
36
+ @blur =" handleBlur"
32
37
/>
33
38
</div >
34
39
</template >
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ function handleInput(e: any) {
16
16
context ?.node .input (e )
17
17
context ?.handlers .blur (e )
18
18
}
19
+
20
+ function handleBlur(e : Event ) {
21
+ context ?.handlers .blur (e )
22
+ }
23
+
19
24
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
25
</script >
21
26
@@ -29,6 +34,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
29
34
:style =" attrs.style"
30
35
:class =" styleClass"
31
36
@change =" handleInput"
37
+ @blur =" handleBlur"
32
38
/>
33
39
</div >
34
40
</template >
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ const props = defineProps({
12
12
const context = props .context
13
13
const attrs = computed (() => context ?.attrs )
14
14
15
- function handleBlur(e : any ) {
16
- context ?.handlers .blur (e . target . value )
15
+ function handleBlur(e : Event ) {
16
+ context ?.handlers .blur (e )
17
17
}
18
18
19
19
function handleInput(e : any ) {
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ const attrs = computed(() => context?.attrs)
15
15
function handleChange(e : any ) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
+
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
18
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
19
24
</script >
20
25
@@ -31,6 +36,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
31
36
:on-icon =" context.onIcon ?? 'pi pi-check'"
32
37
:off-icon =" context.offIcon ?? 'pi pi-times'"
33
38
@change =" handleChange"
39
+ @blur =" handleBlur"
34
40
/>
35
41
</div >
36
42
</template >
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ function handleInput(e: any) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
18
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
19
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
24
</script >
21
25
@@ -30,6 +34,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
30
34
:input-style =" attrs.style"
31
35
:input-class =" styleClass"
32
36
@change =" handleInput"
37
+ @blur =" handleBlur"
33
38
/>
34
39
</div >
35
40
</template >
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ function handleChange(e: any) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
18
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
19
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
24
</script >
21
25
@@ -31,6 +35,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
31
35
:input-style =" attrs.style"
32
36
:input-class =" styleClass"
33
37
@change =" handleChange"
38
+ @blur =" handleBlur"
34
39
/>
35
40
<span v-if =" context.attrs.labelRight" class =" formkit-prime-right" >{{ context.attrs.labelRight }}</span >
36
41
</div >
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function handleSelect(e: any) {
22
22
}
23
23
24
24
function handleBlur(e : CalendarBlurEvent ) {
25
- context ?.handlers .blur (e .value )
25
+ context ?.handlers .blur (e .originalEvent )
26
26
}
27
27
28
28
function handleClearClick() {
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ const props = defineProps({
12
12
const context = props .context
13
13
const attrs = computed (() => context ?.attrs )
14
14
15
- function handleBlur(e : any ) {
16
- context ?.handlers .blur (e . value )
15
+ function handleBlur(e : Event ) {
16
+ context ?.handlers .blur (e )
17
17
}
18
18
function handleInput(e : any ) {
19
19
context ?.node .input (e .value )
Original file line number Diff line number Diff line change 1
1
<script setup lang='ts'>
2
2
import { type PropType , computed } from ' vue' ;
3
3
import { type FormKitFrameworkContext } from ' @formkit/core' ;
4
+ import { InputNumberBlurEvent } from ' primevue/inputnumber'
4
5
5
6
const props = defineProps ({
6
7
context: {
@@ -12,8 +13,8 @@ const props = defineProps({
12
13
const context = props .context
13
14
const attrs = computed (() => context ?.attrs )
14
15
15
- function handleBlur(e : any ) {
16
- context ?.handlers .blur (e .value )
16
+ function handleBlur(e : InputNumberBlurEvent ) {
17
+ context ?.handlers .blur (e .originalEvent )
17
18
}
18
19
19
20
function handleInput(e : any ) {
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ function spanClass() {
29
29
return result
30
30
}
31
31
32
- function handleBlur(e : any ) {
33
- context ?.handlers .blur (e . target . value )
32
+ function handleBlur(e : Event ) {
33
+ context ?.handlers .blur (e )
34
34
}
35
35
36
36
function handleInput(e : any ) {
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ function handleInput(e: any) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
18
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
19
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
24
</script >
21
25
@@ -46,6 +50,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
46
50
:pt-options =" attrs.ptOptions"
47
51
:unstyled =" attrs.unstyled ?? false"
48
52
@change =" handleInput"
53
+ @blur =' handleBlur'
49
54
/>
50
55
</div >
51
56
</template >
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ function handleChange(e: any) {
16
16
context ?.node .input (props .context ?._value )
17
17
}
18
18
19
+ function handleBlur(e : Event ) {
20
+ context ?.handlers .blur (e )
21
+ }
22
+
19
23
const styleClass = computed (() => (context ?.state .validationVisible && ! context ?.state .valid ) ? ` ${attrs .value ?.class } p-invalid ` : attrs .value ?.class )
20
24
</script >
21
25
@@ -68,6 +72,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
68
72
:pt-options =" attrs.ptOptions"
69
73
:unstyled =" attrs.unstyled ?? false"
70
74
@change =" handleChange"
75
+ @blur =" handleBlur"
71
76
/>
72
77
</div >
73
78
</template >
You can’t perform that action at this time.
0 commit comments