Simply modify the Admin base html file and customize the select2-results
and select2-results
class in your css.
Created
June 17, 2020 11:22
-
-
Save M0r13n/3067cab5e4e2431b13ca376f0cc29fb9 to your computer and use it in GitHub Desktop.
Change Select2 Height and Width for Flask Admin
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
{% extends 'admin/base.html' %} | |
{% block head_css %} | |
{{ super() }} | |
<style> | |
/* Set the max height of Select2 dropdowns to approx 14 elements */ | |
.select2-results { | |
max-height: 400px !important; | |
} | |
.select2-container { | |
width: 400px !important; | |
} | |
</style> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment