This repository was archived by the owner on Aug 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +9
-11
lines changed
src/components/Form/Controls Expand file tree Collapse file tree 5 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,14 @@ export default {
1818 plain : $default ( false )
1919 } ,
2020 computed : {
21- inputStateClasses ( ) {
22- const { state } = this ;
23- return { [ `is-${ state } ` ] : state != null } ;
24- } ,
2521 inputClasses ( ) {
2622 return {
2723 "fd-form__control" : ! this . plain ,
2824 "fd-input--compact" : this . finalCompact ,
29- ...this . inputStateClasses ,
30- "is-required" : this . required
25+ "is-required" : this . required ,
26+ "is-valid" : this . state === "valid" ,
27+ "is-invalid" : this . state === "invalid" ,
28+ "is-warning" : this . state === "warning"
3129 } ;
3230 } ,
3331 inputId ( ) {
Original file line number Diff line number Diff line change 55 :disabled =" disabled ? '' : null"
66 :checked =" checked ? true : false"
77 :value =" value"
8- @input =" $emit('update', $event.target.value, $event)"
8+ @change =" $emit('update', $event.target.value, $event)"
99 v-on =" $listeners"
1010 v-bind =" $attrs"
11+ :id =" inputId"
1112 />
1213</template >
1314
1415<script >
15- // :id="inputId"
1616import InputMixin from " ./InputMixin" ;
1717import { $valueWithDefault , $modelValueWithDefault } from " ./Helper/prop" ;
1818
Original file line number Diff line number Diff line change 77 @change =" $emit('update', $event.target.value)"
88 v-on =" $listeners"
99 v-bind =" $attrs"
10+ :id =" inputId"
1011 >
1112 <slot />
1213 </select >
1314</template >
1415
1516<script >
16- // :id="inputId"
1717import InputMixin from " ./InputMixin" ;
1818import { $valueWithDefault } from " ./Helper/prop" ;
1919
Original file line number Diff line number Diff line change 77 :value =" value"
88 :disabled =" disabled"
99 @update =" $emit('update', $event)"
10- ></ FdCheckbox >
10+ / >
1111 <span class =" fd-toggle__switch" role =" presentation" />
1212 </span >
1313</template >
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ describe("FormItem", () => {
4141 expect ( radio . isVisible ( ) ) . toBe ( true ) ;
4242
4343 radio . element . value = "helloWorld" ;
44- radio . trigger ( "input " ) ;
44+ radio . trigger ( "change " ) ;
4545 await localVue . nextTick ( ) ;
4646 expect ( form . vm . checked ) . toBe ( "helloWorld" ) ;
4747 } ) ;
You can’t perform that action at this time.
0 commit comments