kgabryje commented on a change in pull request #16230:
URL: https://github.com/apache/superset/pull/16230#discussion_r687646643
##########
File path:
superset-frontend/src/explore/components/controls/ConditionalFormattingControl/FormattingPopoverContent.tsx
##########
@@ -57,6 +57,131 @@ const operatorOptions = [
{ value: COMPARATOR.BETWEEN_OR_RIGHT_EQUAL, label: '< x ≤' },
];
+const targetValueLeftValidator = (rightValue?: number) => (
+ _: any,
+ value?: number,
+) => {
+ if (!value || !rightValue || Number(rightValue) > Number(value)) {
+ return Promise.resolve();
+ }
+ return Promise.reject(
+ new Error(t('This value should be smaller than the right target value')),
+ );
+};
+
+const targetValueRightValidator = (leftValue?: number) => (
Review comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]