documentation/content/developer/reference/frontend/generic_components.rst
Géry Debongnie a76e505892 [IMP] developer: rename addons/js => backend/frontend
The terminology did not really make sense for a lot of these sub pages.
This change should have been done long ago, but was probably delayed
because some people in Odoo call the web client the "backend", which is
really misleading.

This commit also renames the title "Reference Guides" to "Reference",
since this section does not contain any guides anyway.

Part-of: odoo/documentation#1243
2021-11-02 13:42:38 +00:00

48 lines
1.1 KiB
ReStructuredText

==================
Generic Components
==================
The Odoo web client is built with `Owl <https://github.com/odoo/owl>`_ components.
To make it easier, the Odoo javascript framework provides a suite of generic
components that can be reused in some common situations, such as dropdowns,
checkboxes or datepickers. This page explains how to use these generic components.
CheckBox
========
Location
--------
`@web/core/checkbox/checkbox`
Description
-----------
This is a simple checkbox component with a label next to it. The checkbox is
linked to the label: the checkbox is toggled whenever the label is clicked.
.. code-block:: xml
<CheckBox value="boolean" disabled="boolean" t-on-change="onValueChange">
Some Text
</CheckBox>
Props
-----
.. list-table::
:widths: 20 20 60
:header-rows: 1
* - Name
- Type
- Description
* - `value`
- `boolean`
- if true, the checkbox is checked, otherwise it is unchecked
* - `disabled`
- `boolean`
- if true, the checkbox is disabled, otherwise it is enabled