cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 segmentedButton set none selected

Former Member
0 Kudos

Hi, I've added a segmentedButton object in my app but one is default selected. I need none to be selected so that the user chooses one of them. I've had a look at the examples and all seem to have one button selected. I have as follows:

<SegmentedButton> <items>

<SegmentedButtonItem text="yes" key="yes" press="actionInput" /> <SegmentedButtonItem text="NO" press="actionInput"/>

</items> </SegmentedButton>

How can I have both buttons displayed unselected ?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi,

<SegmentedButton selectedButton="none"> 
	<items>
		<SegmentedButtonItem text="yes" key="yes" press="actionInput" /> 
		<SegmentedButtonItem text="NO" press="actionInput"/>
	</items>
</SegmentedButton>
Former Member
0 Kudos

Thank you ! I didnt find this in the docs!

Answers (1)

Answers (1)

former_member182862
Active Contributor

Hi

You can play a trick like this.

https://jsbin.com/kemejib/edit?html,js,output

Former Member
0 Kudos

Thanks, this was an option, using an invisible button and mark it as selected. It's also working!