Skip to content

Commit

Permalink
Fix width of drug selector input
Browse files Browse the repository at this point in the history
I can't claim to 100% understand what was going on here, but Select2's
default sizing option was causing this input to be very slightly too
wide for the form:
https://select2.org/appearance#container-width
  • Loading branch information
evansd committed Sep 11, 2024
1 parent c6f2e56 commit af22e95
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions openprescribing/media/js/src/analyse-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ var queryForm = {
};
var optionsNum = $.extend(true, {}, select2Options);
optionsNum.placeholder += ', e.g. Cerazette';
optionsNum.width = "element";
var optionsDenom = $.extend(true, {}, select2Options);
optionsDenom.placeholder += ', e.g. 7.3.2';
$(this.el.numeratorIds).select2(optionsNum);
Expand Down

0 comments on commit af22e95

Please sign in to comment.