Segmented buttons as buttons?

I’d like to use the “segmented” component as actual buttons, i.e. there is nothing selected when it loads, but when a user pushes one, it takes an defined action. Can someone provide an example? (I didn’t see any examples, and the segmented component seems to be acting more like a selection box…)

Thank you,

If selected option is not defined for a segmented button, the first option will be selected. You can try to define non-existent option as selected. To process option click you can apply attachEvent method for onItemClick" event listener or use “click” property in button config, as in :

... { view:"segmented", selected: "other", click: "clickHandler",inputWidth:300, options: [ { label: 'Option1', value: 'option1'}, { label: 'Option2', value: 'option2'}, { label: 'Option3', value: 'option3'} ] } ... function clickHandler(){ var value = this.getValue(); //your code here }