diff --git a/core/src/components/segment-view/test/basic/index.html b/core/src/components/segment-view/test/basic/index.html index e0128ccee8..c9b28cbc14 100644 --- a/core/src/components/segment-view/test/basic/index.html +++ b/core/src/components/segment-view/test/basic/index.html @@ -62,6 +62,7 @@ Value + All @@ -141,12 +142,20 @@ } else { currentValue = 'value'; } + segmentView.setContent(currentValue); } - function clearSegmentValue() { - const segment = document.querySelector('#noValueSegment'); - segment.value = undefined; + async function clearSegmentValue() { + const segmentView = document.querySelector('#noValueSegmentView'); + segmentView.setContent('no', false); + + // Set timeout to ensure the value is cleared after + // the segment content is updated + setTimeout(() => { + const segment = document.querySelector('#noValueSegment'); + segment.value = undefined; + }); }