Flask-AppBuilder icon indicating copy to clipboard operation
Flask-AppBuilder copied to clipboard

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

Open jeffrozica opened this issue 3 years ago • 1 comments

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

jeffrozica avatar Jan 23 '23 20:01 jeffrozica

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

gbrault avatar Jan 26 '23 11:01 gbrault