File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
core/src/components/segment-view/test/basic Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 6262 < ion-segment-content id ="value "> Value</ ion-segment-content >
6363 </ ion-segment-view >
6464
65+ < ion-toolbar >
6566 < ion-segment value ="all ">
6667 < ion-segment-button content-id ="all " value ="all ">
6768 < ion-label > All</ ion-label >
141142 } else {
142143 currentValue = 'value' ;
143144 }
145+
144146 segmentView . setContent ( currentValue ) ;
145147 }
146148
147- function clearSegmentValue ( ) {
148- const segment = document . querySelector ( '#noValueSegment' ) ;
149- segment . value = undefined ;
149+ async function clearSegmentValue ( ) {
150+ const segmentView = document . querySelector ( '#noValueSegmentView' ) ;
151+ segmentView . setContent ( 'no' , false ) ;
152+
153+ // Set timeout to ensure the value is cleared after
154+ // the segment content is updated
155+ setTimeout ( ( ) => {
156+ const segment = document . querySelector ( '#noValueSegment' ) ;
157+ segment . value = undefined ;
158+ } ) ;
150159 }
151160 </ script >
152161 </ ion-app >
You can’t perform that action at this time.
0 commit comments