Bug 29002: Empty select2 options for patron at modal close
Select2's recommended reset doesn't remove <option> blocks it adds for ajax responses.. as such it gets confused when you subsequently re-initialise. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
f1bb412c77
commit
c358f9cc45
|
|
@ -552,6 +552,7 @@ $("#placeBookingForm").on('submit', function(e) {
|
|||
|
||||
$('#placeBookingModal').on('hidden.bs.modal', function (e) {
|
||||
$('#booking_patron_id').val(null).trigger('change');
|
||||
$('#booking_patron_id').empty();
|
||||
$('#booking_item_id').val(0).trigger('change');
|
||||
$('#period').get(0)._flatpickr.clear();
|
||||
$('#booking_start_date').val('');
|
||||
|
|
|
|||
Loading…
Reference in New Issue