Skip to content
Snippets Groups Projects
Commit 91fb0d30 authored by Samuel Degueldre's avatar Samuel Degueldre Committed by qsm-odoo
Browse files

[FIX] website: fix number of column option broken layout


Normally, the number of column option adjusts the width of each column
after changing their number so that they always fit in one row. In
previous versions, the sequence of the code was correct thanks to
jQuery's deferreds executing their then callbacks synchronously if the
promise was already resolved. However, native Promise objects always
put their then callbacks in the microtask queue, and this was resulting
in the column width classes being recalculated before their number had
actually changed.

This commit fixes that by calculating the width of the columns based on
how many columns there will be after addition/removal. It also
introduces a new field on the option that is used to update the UI so
that it displays the correct number.

closes odoo/odoo#44849

X-original-commit: 58804d6ea375629b07748bc442eaccc401c56d1b
Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent e8a580f3
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment