Output a group of action button. Refer to: `pywebio.input.actions()` Unlike the ``actions()``, ``put_actions()`` won't submit any form, it will only set the value of the pin widget. Only 'submit' type button is available in pin widget version. .. versionadded:: 1.4
(name: str, *, label: str = '', buttons: List[Union[Dict[str, Any], Tuple, List, str]] = None,
help_text: str = None, scope: str = None, position: int = OutputPosition.BOTTOM)
| 222 | |
| 223 | |
| 224 | def put_actions(name: str, *, label: str = '', buttons: List[Union[Dict[str, Any], Tuple, List, str]] = None, |
| 225 | help_text: str = None, scope: str = None, position: int = OutputPosition.BOTTOM) -> Output: |
| 226 | """Output a group of action button. Refer to: `pywebio.input.actions()` |
| 227 | |
| 228 | Unlike the ``actions()``, ``put_actions()`` won't submit any form, it will only set the value of the pin widget. |
| 229 | Only 'submit' type button is available in pin widget version. |
| 230 | |
| 231 | .. versionadded:: 1.4 |
| 232 | """ |
| 233 | from pywebio.input import actions |
| 234 | check_dom_name_value(name, 'pin `name`') |
| 235 | single_input_return = actions(name=name, label=label, buttons=buttons, help_text=help_text) |
| 236 | input_kwargs = single_input_kwargs(single_input_return) |
| 237 | for btn in input_kwargs['item_spec']['buttons']: |
| 238 | assert btn['type'] == 'submit', "The `put_actions()` pin widget only accept 'submit' type button." |
| 239 | return _pin_output(input_kwargs, scope, position) |
| 240 | |
| 241 | |
| 242 | def put_file_upload(name: str, *, label: str = '', accept: Union[List, str] = None, placeholder: str = 'Choose file', |
searching dependent graphs…