File tree Expand file tree Collapse file tree 1 file changed +5
-25
lines changed
Expand file tree Collapse file tree 1 file changed +5
-25
lines changed Original file line number Diff line number Diff line change @@ -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 separator : string ;
18+ @bindable public separator : string = ', ' ;
1919
2020 @bindable ( { defaultBindingMode : bindingMode . twoWay } )
2121 public value : any = undefined ;
@@ -137,33 +137,13 @@ export class UxChipInput implements Themable {
137137 }
138138
139139 public chipsChanged ( ) {
140- let seperator = ', ' ;
140+ let chipValue : string | null = this . chips . join ( this . separator ) ;
141141
142- if ( this . separator ) {
143- seperator = this . separator ;
142+ if ( chipValue === '' ) {
143+ chipValue = null ;
144144 }
145145
146- this . value = this . chips . join ( seperator ) ;
147- }
148-
149- public valueChanged ( ) {
150- if ( this . value === null ) {
151- return ;
152- }
153-
154- let seperator = ', ' ;
155-
156- if ( this . separator ) {
157- seperator = this . separator ;
158- }
159-
160- let newValue : string | null = this . chips . join ( seperator ) ;
161-
162- if ( newValue === '' ) {
163- newValue = null ;
164- }
165-
166- this . value = newValue ;
146+ this . value = chipValue ;
167147 }
168148
169149 public disabledChanged ( newValue : any ) {
You can’t perform that action at this time.
0 commit comments