====== behavior: popup-selector ====== Similar to '' when you need to switch state of repeatable items, e.g. in rows of some table/grid. ===== Elements ===== that have this behavior applied by default (see [[h-smile:built-in-behaviors:master_style_sheet]]): * button[type="selector"] ===== Attributes ===== that this behavior knows about: * ''menu="css-selector"'' - CSS selector of menu element, example: ''
...
'' * ''value="string"'' - initial and current value. Menu items (''
  • s'') may have ''value'' attribute declared. On click of such item: - content will be copied to the '''' portion of the control and - value of the ''value'' attribute will be copied to the ''value'' attribute of the control itself. If there is no ''menu'' attribute defined then this behavior will use first '''' or '''' child of the element that has this behavior applied. Example #1, selector with external items: ===== Value ===== Value of the element is a value of attribute "value" of the selected menu item. ===== Events ===== Along with the standard set of events (mouse, keyboard, focus) //behavior: selector// generates: * BUTTON_STATE_CHANGED event - value was changed by the user.