[IMP] web: update usePosition API
This commit updates the documentation of the position hook, to add the latest variant "fit". This variant was introduced recently in commit (1), when using it in the SelectMenu component. (1): https://github.com/odoo/odoo/commit/c21c415f3865b73c6dee9c9cf92224e684226f36 closes odoo/documentation#3261 Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit is contained in:
@@ -242,10 +242,12 @@ API
|
||||
- the desired position. It is a string composed of one `Direction` and one
|
||||
`Variant` separated by a dash character.
|
||||
`Direction` could be: `top`, `bottom`, `right`, `left`.
|
||||
`Variant` could be: `start`, `middle`, `end`.
|
||||
`Variant` could be: `start`, `middle`, `end`, `fit`.
|
||||
The variant can be omitted (default variant is `middle`).
|
||||
The `fit` variant means that the popper would have the exact same width or height,
|
||||
depending on the chosen direction.
|
||||
Examples of valid positions: `right-end`, `top-start`, `left-middle`,
|
||||
`left`. (default position: `bottom`)
|
||||
`left`, `bottom-fit`. (default position: `bottom`)
|
||||
* - `onPositioned`
|
||||
- (el: HTMLElement, position: PositioningSolution) => void
|
||||
- a callback that will be called everytime a positioning occurs
|
||||
|
||||
Reference in New Issue
Block a user