Skip to content
Advertisement

Flask-Admin inline-editable list dropdown menu squished (can’t see menu items)

A picture is worth a thousand words. Here’s what I’m trying to fix in Flask-Admin:

Flask-Admin inline editing can't see dropdown many contents

I’m trying to edit a field from the list view by including the field in the column_editable_list of the model view. The field’s values come from another table via a foreign key relationship, so the user selects a value from the dropdown menu, which is not visible, I guess because there are too many columns in the view, so it’s squished?

Anybody know how to fix this without removing the other columns from the list view?

Here’s my model view (I’ve removed quite a few columns to simplify this a bit for StackOverflow):

JavaScript

Here’s the underlying SQLAlchemy model:

JavaScript

Thanks! Sean

Advertisement

Answer

I fixed the problem with custom CSS. Flask-Admin uses Select2 for form fields.

JavaScript

showing results of setting min-width: 200px in CSS

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement