File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
test/nuxt/components/Input Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { noCorrect } from '~/utils/input'
33
44const props = withDefaults (
55 defineProps <{
6+ disabled? : boolean
67 modelValue? : string
78 size? : ' small' | ' medium' | ' large'
89 noCorrect? : boolean
@@ -47,5 +48,9 @@ defineExpose({
4748 'text-sm px-3 py-2.5 h-10 rounded-lg': size === 'medium',
4849 'text-base px-6 py-3.5 h-14 rounded-xl': size === 'large',
4950 }"
51+ :disabled ="
52+ /** Catching Vue render-bug of invalid `disabled=false` attribute in the final HTML */
53+ disabled ? true : undefined
54+ "
5055 />
5156</template >
Original file line number Diff line number Diff line change @@ -146,8 +146,6 @@ describe('InputBase', () => {
146146 const input = component . find ( 'input' )
147147 expect ( input . attributes ( 'disabled' ) ) . toBeDefined ( )
148148 expect ( ( input . element as HTMLInputElement ) . disabled ) . toBe ( true )
149- // should add just `disabled`, not `disabled="true"`
150- expect ( ( input . element as HTMLInputElement ) . getHTML ( ) ) . not . toContain ( 'disabled=' )
151149 } )
152150 } )
153151} )
You can’t perform that action at this time.
0 commit comments