react-awesome-query-builder icon indicating copy to clipboard operation
react-awesome-query-builder copied to clipboard

defined operator.valuesLabels not visible

Open ctrlaltdylan opened this issue 5 years ago • 1 comments

Describe the bug When creating a custom operator, the valueLabels don't show even when they're defined. See the geoproximity operator in this codesandbox:

https://codesandbox.io/s/nice-sunset-7n6c3?file=/src/config.js

To Reproduce The codesandbox tells the story, for some reason the valueLabels aren't showing as options.

Expected behavior I expect the list of valueLabels to display when the field is chosen and you select the next operator.

Screenshots valueLabels Screen Shot 2020-04-18 at 2 33 05 PM

Actual behavior:

Screen Shot 2020-04-18 at 2 33 57 PM

Additional context This is a custom operator using a custom type in conjunction with a couple other custom operators.

ctrlaltdylan avatar Apr 18 '20 18:04 ctrlaltdylan

Starting to understand the issue. I assumed that the 2 fields were supplied by the operator.geoproximity.valuesList property, but actually it's other fields with the same type - a.k.a. the geo type.

This presents a weird problem, the geo field only makes sense when comparing with another geo field with a modifier like number of miles/kilometers away.

I'll keep playing, but I didn't realize that the proximity comparison fields were not based on valuesList.

ctrlaltdylan avatar Apr 18 '20 23:04 ctrlaltdylan