geomoose / gm3

GeoMoose 3.0 Development. Please submit pull requests to the 'main' branch.
https://www.geomoose.org
MIT License
58 stars 59 forks source link

Super Search behaves oddly with default values other than 'do not use' #776

Closed chughes-lincoln closed 1 year ago

chughes-lincoln commented 1 year ago

For the super search the first operator choice for each of the search options is 'do not use'. If you change that to something else (i.e. 'ilike'), it still interprets that operator as 'do not use' unless you manually change it in the drop-down.

For example, let's say I set the operators as

{value: 'ilike', label: 'Similar to'},
{value: 'eq', label: 'Equal to'},
{value: 'in', label: 'In list'}

If I don't change anything it will interpret the operator as 'do not use' rather than 'ilike'. If I want an 'ilike' search I would need to manually change to 'eq' or 'in' in the drop-down, and then switch back to 'ilike'.

Perhaps I'm misinterpreting how this search should be used, but I was hoping it would behave more like the old geomoose 2 advanced search, where you would be able to set a default comparitor, and 'do not use' was assumed whenever a user didn't enter something into a given box (not that emulating geomoose 2 is the goal).

chughes-lincoln commented 1 year ago

Fixed by https://github.com/geomoose/gm3/pull/762