You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<scriptsrc="filtrex.2.2.0.min.js"></script><pre><script>varfn1=filtrex.compileExpression("x==1");document.write('{x:1}:',fn1({x:1}),"\n");//1document.write('{x:2}:',fn1({x:2}),"\n");//0document.write('{y:1}:',fn1({y:1}),"\n");//0varfn2=filtrex.compileExpression("x!=1");document.write('{x:1}:',fn2({x:1}),"\n");//0document.write('{x:2}:',fn2({x:2}),"\n");//1document.write('{y:1}:',fn2({y:1}),"\n");//1 (this should be 0)varfn3=filtrex.compileExpression("x!=1 and x!=null");document.write('{x:1}:',fn3({x:1}),"\n");//0document.write('{x:2}:',fn3({x:2}),"\n");//1document.write('{y:1}:',fn3({y:1}),"\n");//0 (this is ok)</script></pre>
I can resolve this by using x!=1 and x!=null, but a little troublesome.
Could you provide a way to make that default false? Maybe add an option or something.
The text was updated successfully, but these errors were encountered:
Hey @smartsl!
Starting with Filtrex v3, trying to access an undefined property will result in an error (#22). However, also in Filtrex v3 you can overload any operator to do whatever you want (#30), so there should be a way for you to make Filtrex do whatever you need.
However, you should know that I don't think that x != 1 evaluating to false for anything else than { x: 1 } is good UX.
For example:
I can resolve this by using
x!=1 and x!=null
, but a little troublesome.Could you provide a way to make that default false? Maybe add an option or something.
The text was updated successfully, but these errors were encountered: