File tree 1 file changed +13
-3
lines changed
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ import { usePrimeVue } from 'primevue/config'
2
2
import { computed } from 'vue'
3
3
4
4
export function useFormKitInput ( context : any ) {
5
- const primevue = usePrimeVue ( )
6
-
7
5
const isInvalid = computed ( ( ) => {
8
6
return context ?. state . validationVisible && ! context ?. state . valid
9
7
} )
@@ -12,8 +10,20 @@ export function useFormKitInput(context: any) {
12
10
return ( context ?. state . validationVisible && ! context ?. state . valid ) ? `${ context ?. attrs ?. class } p-invalid` : context ?. attrs ?. class
13
11
} )
14
12
13
+ function isGlobalUnstyledMode ( ) : boolean {
14
+ let result = false
15
+ try {
16
+ const primevue = usePrimeVue ( )
17
+ result = primevue ?. config ?. unstyled || false
18
+ }
19
+ // eslint-disable-next-line unused-imports/no-unused-vars
20
+ catch ( e ) {
21
+ }
22
+ return result
23
+ }
24
+
15
25
const unstyled = computed ( ( ) => {
16
- return context ?. unstyled ?? primevue ?. config ?. unstyled
26
+ return context ?. unstyled ?? isGlobalUnstyledMode ( )
17
27
} )
18
28
19
29
function handleBlur ( event : Event ) {
You can’t perform that action at this time.
0 commit comments