Conditions after free text
https://github.com/mixmaxhq/search-string/blob/8eed1468019b58442222b144926c6e98652dff19/src/searchString.js#L303
I know it's a tiny thing, but I think it makes more sense to have conditions follow rather than precede the freetext. I'm happy to submit a PR but would you rather it was an option or a default? Would it be an argument to toString()?
Hey @gausie great idea. I hesitate to change the default arrangement. It seems to work well for us at Mixmax and I think that would warrant a major version semver.
I think a PR with toString({ textBeforeConditions }) would work. Please include a test! 😄
How about having the freetext / options in it's original position?
Image I type this into the search field:
foo -bar prop1:false
and when pressing enter it (confusing to the user) changes the input to:
prop1:false -bar foo
etc.
I now have to discover/find my freetext/props to change it. So maybe adding a third option: toString({ originalOrder})
Hey @abergs I think that's a great idea! That's something we noticed here at Mixmax and would love to improve. Assuming it is done well, I think that should be the default functionality. Would be a sweet PR if you're keen to do it!
I'm going to try to pick this up next week, focusing on original order.