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
Is your feature request related to a problem? Please describe.
I've created my own custom operator - bitwise operator AND (implementation based on proximity operator)
if in config.types i set defaultOperator different from my custom operator,
for example: defaultOperator: "equal" then when user changes operator from default to my custom operator
props.optios returns null (props.optios=null) instead of properties (operator and value).
Describe the solution you'd like
As far as i understand such behaviour occures from flag canReuseValue in method setOperator (modules/stores/tree.js).
During Flag evaluation in method getNewValueForFieldOp (modules/utils/validation.js) additional properties of new operator aren't being taken into account.
For proximity operator described issue is not applicable because there is hard coded check for this operator:
if (currentOperator != newOperator && [currentOperator, newOperator].includes("proximity")) canReuseValue = false;
Is it possible to somehoww improve logic behind canReuseValue flag (to account custom operators properties) or am i doing something wrong?
Describe alternatives you've considered
At least for now there is a workaround: you can set config.settings.clearValueOnChangeOp=true, but it would be great if another way existed, because there are some cases when i dont want to clear filed value
Please let me know your thoughts.
Best regards.
The text was updated successfully, but these errors were encountered:
Hi!
Is your feature request related to a problem? Please describe.
I've created my own custom operator - bitwise operator AND (implementation based on proximity operator)
Definition in config.operators
Settings for custom operator
if in config.types i set defaultOperator different from my custom operator,
for example: defaultOperator: "equal" then when user changes operator from default to my custom operator
props.optios returns null (props.optios=null) instead of properties (operator and value).
Describe the solution you'd like
As far as i understand such behaviour occures from flag canReuseValue in method setOperator (modules/stores/tree.js).
During Flag evaluation in method getNewValueForFieldOp (modules/utils/validation.js) additional properties of new operator aren't being taken into account.
For proximity operator described issue is not applicable because there is hard coded check for this operator:
if (currentOperator != newOperator && [currentOperator, newOperator].includes("proximity")) canReuseValue = false;
Is it possible to somehoww improve logic behind canReuseValue flag (to account custom operators properties) or am i doing something wrong?
Describe alternatives you've considered
At least for now there is a workaround: you can set config.settings.clearValueOnChangeOp=true, but it would be great if another way existed, because there are some cases when i dont want to clear filed value
Please let me know your thoughts.
Best regards.
The text was updated successfully, but these errors were encountered: