-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
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
[core] feat(NumericInput): add leftElement
prop
#5383
[core] feat(NumericInput): add leftElement
prop
#5383
Conversation
Thanks for your interest in palantir/blueprint, @alex-c! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
leftElement
to NumericInput
leftElement
to NumericInput
leftElement
to NumericInput
Sorry about the trouble building the project in Windows. Generally I advise running the individual build scripts in each package for the best debugging experience. For example:
It looks like you've managed to trigger the CI build successfully, though, so you should get build & test results here within a few minutes of pushing your commits. There are actually quite a few tests for NumericInput: https://github.com/palantir/blueprint/blob/develop/packages/core/test/controls/numericInputTests.tsx I'll review this PR soon! |
Oh, I guess I only looked for tests in the forms directory. I'll take another look and see if I can add some meaningful tests. |
I have now added two basic test cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, this looks great! thanks for the PR, I appreciate the new option added to the NumericInput example in the docs.
leftElement
to NumericInput
leftElement
prop
Fixes #5051
Hello, I created this draft PR, as I would like to fix #5051, but I have trouble building the project on Windows (see #4221) and am not sure what I should add in the ways of tests.
I added the necessary change and added an example to the docs. While I cannot run
yarn verify
(see above),yarn compile
andyarn lint
run fine. The change seems to work fine (see screenshot at the bottom).I am also not sure what/how much I should do in the ways of tests. So far, there are no tests for
NumericInput
at all, as far as I can see... Nor are there forInputGroup
?Checklist
Changes proposed in this pull request:
Add
leftElement
as an alternative toleftIcon
forNumericInput
, the same way it is forInputGroup
. SinceNumericInput
usesInputGroup
, theleftElement
prop can just be passed down.Reviewers should focus on:
leftElement
should be working forNumericInput
.Screenshot
The following screenshot is from the example I added to the docs. Setting a button with a popover in
leftIcon
breaks the layout. WithleftElement
it works fine: