Skip to Content
0

SAPUI5 segmentedButton set none selected

Jun 23, 2017 at 08:11 PM

148

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
naresh b Jun 26, 2017 at 07:53 AM
0

Hi,

<SegmentedButton selectedButton="none"> 
	<items>
		<SegmentedButtonItem text="yes" key="yes" press="actionInput" /> 
		<SegmentedButtonItem text="NO" press="actionInput"/>
	</items>
</SegmentedButton>
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you ! I didnt find this in the docs!

0
Dennis Seah
Jun 24, 2017 at 01:13 AM
1

Hi

You can play a trick like this.

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0