-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fields default to Blank String #1126
Changes from 4 commits
ba1a709
1d7c1a9
a19b930
9f7084d
c058e4b
440efcd
e844d7c
e192bcd
4f59946
a684cd2
e8945fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,8 @@ MarkdownPreview.propTypes = { | |
value: PropTypes.string, | ||
}; | ||
|
||
MarkdownPreview.defaultProps = { | ||
value: '', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason we need to set this on the MD preview, and not any of the other previews? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you referring to the 'RawEditor' and 'VisualEditor' files? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as the kitchen sink goes, I'll take a look this evening or tomorrow afternoon. My apologies, I did not test creating a new sink. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I just noticed that you set a default value on the MarkdownPreview as well as the MarkdownControl. Was there a reason? |
||
}; | ||
|
||
export default MarkdownPreview; |
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.
@MichaelRomani We still want to allow users to manually set a default here, just default it to
undefined
instead ofnull
. The code would befield.get('default')
, just removingnull
as the second param like @erquhart mentioned.