Commit 601c485c authored by Clement Ho's avatar Clement Ho

Auto close cloned dropdowns for ci variable list

The flow around Bootstrap v4 dropdown and glDropdown changed which resulted in new variable rows to having a blank dropdown open,

 - With BS3: opened dropdown -> clone and insert new row -> hide old dropdown -> hide new dropdown
 - With BS4: opened dropdown -> clone and insert new row -> hide old dropdown

We are fixing this by cleaning up the dirty row clone  class so we don't have to rely on magic events hiding both the old and new dropdowns
parent d77bfe5f
...@@ -141,6 +141,11 @@ export default class VariableList { ...@@ -141,6 +141,11 @@ export default class VariableList {
$rowClone.find(entry.selector).val(entry.default); $rowClone.find(entry.selector).val(entry.default);
}); });
// Close any dropdowns
$rowClone.find('.show').each((index, $dropdown) => {
$dropdown.classList.remove('show');
});
this.initRow($rowClone); this.initRow($rowClone);
$row.after($rowClone); $row.after($rowClone);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment