Render depends on menu items conditionally in chart settings + fix min max values (#15391)
closes https://discord.com/channels/1130383047699738754/1430894689317294152 --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com> Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
This commit is contained in:
+3
-2
@@ -49,8 +49,8 @@ export const CommandMenuItemNumberInput = ({
|
||||
const numericValue = castAsNumberOrNull(draftValue);
|
||||
|
||||
if (isDefined(onValidate)) {
|
||||
const isInvalid = onValidate(numericValue);
|
||||
if (isInvalid) {
|
||||
const isValid = onValidate(numericValue);
|
||||
if (!isValid) {
|
||||
setHasError(true);
|
||||
return;
|
||||
}
|
||||
@@ -86,6 +86,7 @@ export const CommandMenuItemNumberInput = ({
|
||||
onBlur={handleBlur}
|
||||
onKeyDown={handleKeyDown}
|
||||
placeholder={placeholder}
|
||||
error={hasError ? ' ' : undefined}
|
||||
noErrorHelper
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user