File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div class =" form-group" >
33 <label v-if =" form[key].label" :for =" form[key].id ? form[key].id : null" >{{form[key].label}}</label >
4- <input class =" form-control" :class =" form[key].classes" :id =" form[key].id ? form[key].id : null" :type =" form[key].inputType" v-model =" form[key].value" @blur =" onBlur" @focus =" onFocus" @click =" onClick" @change =" onChange" @keyup =" onKeyup" @keydown =" onKeydown" v-formly-atts =" form[key].atts" >
4+ <input class =" form-control" :class =" form[key].classes" :id =" form[key].id ? form[key].id : null" :type =" form[key].inputType || text " v-model =" form[key].value" @blur =" onBlur" @focus =" onFocus" @click =" onClick" @change =" onChange" @keyup =" onKeyup" @keydown =" onKeydown" v-formly-atts =" form[key].atts" >
55 </div >
66</template >
77
Original file line number Diff line number Diff line change @@ -199,6 +199,16 @@ describe('Bootstrap Field Inputs', () => {
199199 } , 0 ) ;
200200
201201 } ) ;
202+
203+ it ( 'defaults to text' , ( ) => {
204+ data . form . test . type = 'input' ;
205+ data . form . test . inputType = '' ;
206+ createForm ( data ) ;
207+
208+ let inputs = vm . $el . querySelectorAll ( 'input' ) ;
209+ let input = inputs [ 0 ] ;
210+ expect ( input . type ) . to . equal ( 'text' ) ;
211+ } ) ;
202212 } ) ;
203213
204214
You can’t perform that action at this time.
0 commit comments