File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 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'
22import { computed } from 'vue'
33
44export function useFormKitInput ( context : any ) {
5- const primevue = usePrimeVue ( )
6-
75 const isInvalid = computed ( ( ) => {
86 return context ?. state . validationVisible && ! context ?. state . valid
97 } )
@@ -12,8 +10,20 @@ export function useFormKitInput(context: any) {
1210 return ( context ?. state . validationVisible && ! context ?. state . valid ) ? `${ context ?. attrs ?. class } p-invalid` : context ?. attrs ?. class
1311 } )
1412
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+
1525 const unstyled = computed ( ( ) => {
16- return context ?. unstyled ?? primevue ?. config ?. unstyled
26+ return context ?. unstyled ?? isGlobalUnstyledMode ( )
1727 } )
1828
1929 function handleBlur ( event : Event ) {
You can’t perform that action at this time.
0 commit comments