Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrading to flask-appbuilder 4.2.0 from 4.1.6 search filter greater than or less than does not work #1983

Open
jeffrozica opened this issue Jan 23, 2023 · 1 comment · May be fixed by #1986
Labels

Comments

@jeffrozica
Copy link

jeffrozica commented Jan 23, 2023

After upgrading to flask-appbuilder 4.2.0 from 4.1.6 greater than or less filter in search does not work

I was going crazy trying to figure out why the filter was not working in a search. When you select a filter on a date or number field, if you choose greater than or less than, after clicking on Search button those filters disappear and don't get applied. I thought I screwed some code up some how, but it turns out it was after upgrading to flask-appbuilder v4.2.0. I went back to flask-appbuilder v4.1.6 and all started working again, no coding changes. equals and not equals works.

I spent many hours thinking I did something wrong.

Here are my flask versions
Flask==2.2.2
Flask-AppBuilder==4.2.0 (changed to 4.1.6 and all works, all other versions listed here are the same when working)
Flask-Babel==2.0.0
Flask-Bootstrap==3.3.7.1
Flask-JWT-Extended==4.4.4
Flask-Login==0.6.2
Flask-Migrate==4.0.2
Flask-OpenID==1.3.0
Flask-SQLAlchemy==2.5.1
Flask-WTF==1.1.1
FORM VERSIONS
WTForms==3.0.1
WTForms-Components==0.10.5

@gbrault
Copy link

gbrault commented Jan 26, 2023

this code should be

function changeOperation(e, $el, name) {
        $in = $el.find('.filter_val');
        $in.attr('name','_flt_' + e.delegateTarget.value + '_' + name);
    }

This is due to the fact that a select2 widget is there instead of a simple select

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants