@@ -15,7 +15,7 @@ export class UxChipInput implements Themable {
1515 @bindable public readonly : any = false ;
1616 @bindable public theme = null ;
1717 @bindable public type : any ;
18- @bindable public seperator : string ;
18+ @bindable public separator : string ;
1919
2020 @bindable ( { defaultBindingMode : bindingMode . twoWay } )
2121 public value : any = undefined ;
@@ -25,6 +25,8 @@ export class UxChipInput implements Themable {
2525
2626 public view : View ;
2727 private textbox : HTMLInputElement ;
28+ private chiprepeat : Element ;
29+ private tagrepeat : Element ;
2830
2931 constructor ( private element : HTMLInputElement , public resources : ViewResources , private styleEngine : StyleEngine ) { }
3032
@@ -48,10 +50,14 @@ export class UxChipInput implements Themable {
4850
4951 if ( this . disabled || this . disabled === '' ) {
5052 this . textbox . setAttribute ( 'disabled' , '' ) ;
53+ this . chiprepeat . removeAttribute ( 'deletable' ) ;
54+ this . tagrepeat . removeAttribute ( 'deletable' ) ;
5155 }
5256
5357 if ( this . readonly || this . readonly === '' ) {
5458 this . textbox . setAttribute ( 'readonly' , '' ) ;
59+ this . chiprepeat . removeAttribute ( 'deletable' ) ;
60+ this . tagrepeat . removeAttribute ( 'deletable' ) ;
5561 }
5662 }
5763
@@ -125,19 +131,18 @@ export class UxChipInput implements Themable {
125131 public chipsChanged ( ) {
126132 let seperator = ', ' ;
127133
128- if ( this . seperator ) {
129- seperator = this . seperator ;
134+ if ( this . separator ) {
135+ seperator = this . separator ;
130136 }
131137
132138 this . value = this . chipArray . join ( seperator ) ;
133-
134139 }
135140
136141 public valueChanged ( ) {
137142 let seperator = ', ' ;
138143
139- if ( this . seperator ) {
140- seperator = this . seperator ;
144+ if ( this . separator ) {
145+ seperator = this . separator ;
141146 }
142147
143148 this . chipArray = this . value . split ( seperator ) ;
@@ -146,16 +151,24 @@ export class UxChipInput implements Themable {
146151 public disabledChanged ( newValue : any ) {
147152 if ( newValue === true || newValue === '' ) {
148153 this . textbox . setAttribute ( 'disabled' , 'true' ) ;
154+ this . chiprepeat . removeAttribute ( 'deletable' ) ;
155+ this . tagrepeat . removeAttribute ( 'deletable' ) ;
149156 } else {
150157 this . textbox . removeAttribute ( 'disabled' ) ;
158+ this . chiprepeat . setAttribute ( 'deletable' , '' ) ;
159+ this . tagrepeat . setAttribute ( 'deletable' , '' ) ;
151160 }
152161 }
153162
154163 public readonlyChanged ( newValue : any ) {
155164 if ( newValue === true || newValue === '' ) {
156165 this . textbox . setAttribute ( 'readonly' , 'true' ) ;
166+ this . chiprepeat . removeAttribute ( 'deletable' ) ;
167+ this . tagrepeat . removeAttribute ( 'deletable' ) ;
157168 } else {
158169 this . textbox . removeAttribute ( 'readonly' ) ;
170+ this . chiprepeat . setAttribute ( 'deletable' , '' ) ;
171+ this . tagrepeat . setAttribute ( 'deletable' , '' ) ;
159172 }
160173 }
161174
0 commit comments