We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
max
Spent some time chatting in Slack about this, and was advised to make an issue. Here's the summary of the problem:
The max property alleges that it accepts either a number, or undefined, which checks out when I do either of these:
<EuiProgress max={100} /> <EuiProgress max={undefined} />
.. but TypeScript fails to compile when I do this:
<EuiProgress max={someCondition ? 100 : undefined} />
This doesn't seem to be a TypeScript bug or anything, since this pared-down example still works.
I was able to solve this temporarily by just doing this:
{someCondition ? ( <EuiProgress max={100} /> ) : ( <EuiProgress /> )}
But I'd like to request that max really would accept undefined so that max={someCondition ? 100 : undefined} would work. Thanks!
undefined
max={someCondition ? 100 : undefined}
The text was updated successfully, but these errors were encountered:
Stems from the way that max is defined in the context of ExclusiveUnion.
ExclusiveUnion
#2984 would alleviate the problem, also, but I'm unsure how far off that work is.
Sorry, something went wrong.
I don't think anyone is working on it and this seems like a much smaller thing to tackle
miukimiu
Successfully merging a pull request may close this issue.
Spent some time chatting in Slack about this, and was advised to make an issue. Here's the summary of the problem:
The
max
property alleges that it accepts either a number, or undefined, which checks out when I do either of these:.. but TypeScript fails to compile when I do this:
This doesn't seem to be a TypeScript bug or anything, since this pared-down example still works.
I was able to solve this temporarily by just doing this:
But I'd like to request that
max
really would acceptundefined
so thatmax={someCondition ? 100 : undefined}
would work. Thanks!The text was updated successfully, but these errors were encountered: