Last active
November 1, 2019 03:45
-
-
Save yuchant/d935208978a1fc6e3098 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="/static/css/select2.css" type="text/css" media="screen" rel="stylesheet" /> | |
<script type="text/javascript" src="/static/js/select2.js"></script> | |
<script type="text/javascript"> | |
$(function () { | |
select2Options = { | |
'width': 'resolve', | |
} | |
$("#content-main select:not(.select2-offscreen)").select2(select2Options); | |
Suit.after_inline.register('fire_up_select2', function(inline_prefix, row){ | |
row.find('.select2-container').remove(); | |
row.find('select').removeClass('select2-offscreen'); | |
$(row.find('select')).select2(select2Options); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Best solution ever. Thanks