-
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
Adding addOnBlur to TagInput #1966
Conversation
Fix another docs typoPreview: documentation | landing | table |
Removing extra dash in docPreview: documentation | landing | table |
@@ -23,6 +23,13 @@ import { | |||
import * as Classes from "../../common/classes"; | |||
|
|||
export interface ITagInputProps extends IProps { | |||
/** | |||
* If true, onAdd will also be invoked when the input loses focus. |
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.
Don't think the word also
is necessary here, especially since this is the first prop in the list. I think it reads more clearly without it.
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.
Fixed
packages/labs/test/tagInputTests.tsx
Outdated
// simulate typing input text | ||
wrapper.setProps({ inputProps: { value: NEW_VALUE } }); | ||
wrapper.find("input").simulate("change", { currentTarget: { value: NEW_VALUE } }); | ||
const fakeEvent = { flag: "yes" }; |
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.
What is this flag
property for?
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.
Oops, yeah I can just call simulate("blur")
packages/labs/test/tagInputTests.tsx
Outdated
wrapper.find("input").simulate("change", { currentTarget: { value: NEW_VALUE } }); | ||
const fakeEvent = { flag: "yes" }; | ||
wrapper.simulate("blur", fakeEvent); | ||
setTimeout(() => { |
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.
nit: Add a comment explaining why setTimeout
is necessary. Is this to wait for the focus to change?
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.
Added comment
Merge branch 'develop' into kb/tagInput-propsPreview: documentation | landing | table |
Fixed edge case where inputValue is undefinedPreview: documentation | landing | table |
@kmblake we're super excited to see this land! Any chance we could get an idea o when this will be merged? :) Great job 👍 |
Merge branch 'develop' of github.com:palantir/blueprint into kb/tagInput-propsPreview: documentation | landing | table |
docs tweaksPreview: documentation | landing | table |
@harrisrobin it'll be in the next 2.0 release 👍 |
Fixes #1412 bullet 5
Checklist
Changes proposed in this pull request:
option to add values on blur (in addition to enter) via addOnBlur prop
Reviewers should focus on:
Screenshot