Skip to content

Commit 709ed43

Browse files
committedJun 27, 2023
Fix for select2 validation prompt sizing #189
1 parent fe2ce2e commit 709ed43

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎grails-app/assets/javascripts/forms-knockout-bindings.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@
477477

478478
if (columnWidth > 10) {
479479
select2.css('max-width', columnWidth+'px');
480+
$(element).validationEngine('updatePromptsPosition');
480481
}
481482
else {
482483
// The table is not visible yet, so wait a bit and try again.
@@ -492,7 +493,7 @@
492493
ko.utils.domNodeDisposal.addDisposeCallback(element, function() {
493494
$(window).off('resize', resizeHandler);
494495
});
495-
setTimeout(calculateWidth, 0);
496+
calculateWidth();
496497
}
497498

498499
}
@@ -620,6 +621,9 @@
620621
if (options.preserveColumnWidth) {
621622
forceSelect2ToRespectPercentageTableWidths(element, options.preserveColumnWidth);
622623
}
624+
else {
625+
applySelect2ValidationCompatibility(element);
626+
}
623627
}
624628
};
625629

0 commit comments

Comments
 (0)