django-ajax-datatable icon indicating copy to clipboard operation
django-ajax-datatable copied to clipboard

Fix search with a dropdown and with a booleanfield

Open etiennepouliot opened this issue 3 years ago • 6 comments
trafficstars

Does not make sense to use __icontains by default when we have a drop box :

image

Make more sense

image

Also fix searching a BooleanField :

image

Same without a dropbox :

image

etiennepouliot avatar Dec 15 '21 20:12 etiennepouliot

Thank you @etiennepouliot Could you please check my question about changes in filter.py ?

morlandi avatar Dec 16 '21 07:12 morlandi

@morlandi where is your question ?

etiennepouliot avatar Dec 16 '21 13:12 etiennepouliot

@etiennepouliot I'm not very familiar with github code review tools ... I can see my question right a few lines above this message, and suppose (but I'm not sure) you should see it as well:

Screenshot 2021-12-16 at 15 05 42

or, go to the "File changes" tab of this PR, then scroll down until you see my question just below the pertinent code; here is where I posted it, and you can probably post a reply too:

Screenshot 2021-12-16 at 15 06 26

morlandi avatar Dec 16 '21 14:12 morlandi

Not sure why, but I can't see your comment.

But no, what I'm really testing is if we have one the letter of 'yes' in the filter so that we can filter for True.

IE , if the user partially type 'ye' if will filter for True, wich is intuitive for the user.

etiennepouliot avatar Dec 16 '21 14:12 etiennepouliot

I see ... mumble mumble ... just wondering: If I type any letter, say "x", nothing is selected, but then if I remove pressing backspace, thus receiving an empty string, then only the True records would be selected, filtering out the False ones ?

morlandi avatar Dec 16 '21 15:12 morlandi

You're right, nice catch.

Should be better with the last commit image

image

etiennepouliot avatar Dec 16 '21 15:12 etiennepouliot