[FIX] web: fix wrong ActionSwiper documentation
Since 16.0, the documentation for this component was no longer correct, since the component was moved to web during the refactor of the webclient views. This commit also adds documentation of props that were introduced during the refactor, already present in 16.0. closes odoo/documentation#3504 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
parent
734c0ee6ef
commit
fc79df42fd
@ -164,12 +164,10 @@ checkboxes or datepickers. This page explains how to use these generic component
|
|||||||
ActionSwiper
|
ActionSwiper
|
||||||
------------
|
------------
|
||||||
|
|
||||||
.. note:: This component is a mobile feature, only supported in the Enterprise version of Odoo.
|
|
||||||
|
|
||||||
Location
|
Location
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
`@web_enterprise/core/action_swiper/action_swiper`
|
`@web/core/action_swiper/action_swiper`
|
||||||
|
|
||||||
Description
|
Description
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
@ -177,7 +175,7 @@ Description
|
|||||||
This is a component that can perform actions when an element is swiped
|
This is a component that can perform actions when an element is swiped
|
||||||
horizontally. The swiper is wrapping a target element to add actions to it.
|
horizontally. The swiper is wrapping a target element to add actions to it.
|
||||||
The action is executed once the user has released the swiper passed
|
The action is executed once the user has released the swiper passed
|
||||||
half of its width.
|
a portion of its width.
|
||||||
|
|
||||||
.. code-block:: xml
|
.. code-block:: xml
|
||||||
|
|
||||||
@ -191,7 +189,7 @@ and would not want to duplicate the template. It is possible to do just that.
|
|||||||
|
|
||||||
If you want to extend the behavior of an existing element, you must place the element
|
If you want to extend the behavior of an existing element, you must place the element
|
||||||
inside, by wrapping it directly. Also, you can conditionnally add props to manage when the
|
inside, by wrapping it directly. Also, you can conditionnally add props to manage when the
|
||||||
element might be swipable or not.
|
element might be swipable, its animation and the minimum portion to swipe to perform the action.
|
||||||
|
|
||||||
You can use the component to interact easily with records, messages, items in lists and much more.
|
You can use the component to interact easily with records, messages, items in lists and much more.
|
||||||
|
|
||||||
@ -236,16 +234,25 @@ Props
|
|||||||
* - Name
|
* - Name
|
||||||
- Type
|
- Type
|
||||||
- Description
|
- Description
|
||||||
|
* - `animationOnMove`
|
||||||
|
- `Boolean`
|
||||||
|
- optional boolean to determine if a translate effect is present during the swipe
|
||||||
|
* - `animationType`
|
||||||
|
- `String`
|
||||||
|
- optional animation that is used after the swipe ends (`bounce` or `forwards`)
|
||||||
* - `onLeftSwipe`
|
* - `onLeftSwipe`
|
||||||
- `Object`
|
- `Object`
|
||||||
- if present, the actionswiper can be swiped to the left
|
- if present, the actionswiper can be swiped to the left
|
||||||
* - `onRightSwipe`
|
* - `onRightSwipe`
|
||||||
- `Object`
|
- `Object`
|
||||||
- if present, the actionswiper can be swiped to the right
|
- if present, the actionswiper can be swiped to the right
|
||||||
|
* - `swipeDistanceRatio`
|
||||||
|
- `Number`
|
||||||
|
- optional minimum width ratio that must be swiped to perform the action
|
||||||
|
|
||||||
You can use both `onLeftSwipe` and `onRightSwipe` props at the same time.
|
You can use both `onLeftSwipe` and `onRightSwipe` props at the same time.
|
||||||
|
|
||||||
Those `Object`'s must contain:
|
The `Object`'s used for the left/right swipe must contain:
|
||||||
|
|
||||||
- `action`, which is the callable `Function` serving as a callback.
|
- `action`, which is the callable `Function` serving as a callback.
|
||||||
Once the swipe has been completed in the given direction, that action
|
Once the swipe has been completed in the given direction, that action
|
||||||
|
Loading…
Reference in New Issue
Block a user