Open krysros opened 7 years ago
I think the main problem for
height - which is smaller than normal select or input does not includes validation styles for error
is that the "form-control" class is not added to the correct element. This can be fixed with something like $('#select2-' + oid + '-container').addClass('form-control');
in the select2 template.
That and some styling tweaks should do it.
(Currently containerCssClass: 'form-control',
is passed for the Select2 constructor, but it might be unnecessary. It adds the class to the "wrong" element.)
Came across these issues too.
To fix the styling issues I have used select2-bootstrap-theme from https://github.com/select2/select2-bootstrap-theme. Imho, deform should include this.
To fix the resizing issue set width: null,
when initializing select2.
@mikmatko I would accept a PR with your proposed changes.
Also @krysros or anyone else, I would gladly accept a PR that fixes all these issues. Thanks for reporting and offering a solution.
A PR to fix this can be done according to the version of Deform and Bootstrap.
2.0-branch
, we use Bootstrap 3.x latest. Add https://github.com/select2/select2-bootstrap-thememaster
, we use Bootstrap 4.x latest. Add https://github.com/ttskch/select2-bootstrap4-themeA PR for either should add what @mikmatko suggests. I'll do the forward/back-porting as needed.
There is some styling issues with select2 widget:
select
orinput
Example: