Skip to content

Commit db00a84

Browse files
committed
[FIX] account: compute product description textarea's height on mounted
## Versions 18.0+ ## Issue Blank spaces appear at the bottom of each Sale Order line when a long product description is set. ## Steps to reproduce - Create a new quotation: - Add a product; - Change the description for a long one (3+ lines) or add one; - Go back to the quote list view; - Come back to the quote. ## Cause The component's height computation is done before the columns' widths' computation which then resizes based on font styles, making the text take less space and blank spaces appear. ## Fix Force the computation of the SO line's height once the component is mounted. opw-4766800 closes odoo#216581 Signed-off-by: Pierre Lamotte (pila) <[email protected]>
1 parent c699389 commit db00a84

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

addons/account/static/src/core/utils/product_and_label_autoresize.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import { useAutoresize } from "@web/core/utils/autoresize";
1010
* @param {Ref} ref
1111
*/
1212
export function useProductAndLabelAutoresize(ref, options = {}) {
13-
useAutoresize(ref, { onResize: productAndLabelResizeTextArea, ...options });
13+
useAutoresize(ref, {
14+
onMounted: productAndLabelResizeTextArea,
15+
onResize: productAndLabelResizeTextArea,
16+
...options,
17+
});
1418
}
1519

1620
export function productAndLabelResizeTextArea(textarea, options = {}) {

0 commit comments

Comments
 (0)