-
-
Notifications
You must be signed in to change notification settings - Fork 135
value=
shouldn't be converted to defaultValue=
for <option>
#625
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
Comments
Thanks for opening this issue @philiptzou. What versions are you using ( |
@remarkablemark I already provided an example. I don't think the version is relevant since the current source code explicitly changed value to defaultValue. I have submitted a pull request. |
Hey @remarkablemark, I have a question, but it's not related to this issue, I was looking for various alternatives, and found this package, I was thinking how this how package is different from Babel Transform, or jscodeshift? |
@arpitBhalla for questions unrelated, do you mind creating a new issue? But to answer your current question, this package converts raw HTML string to React elements. If you're looking for something that generates an AST tree, then you can go with Babel or something else. |
Thanks |
* fix(attributes-to-props): don't convert value of option tag Fixes #625 * fix(attributes-to-props): fix issues with tests * fix(attributes-to-props): increase size limit * fix(attributes-to-props): improve jsdoc documentation * fix(attributes-to-props): remove lock file * fix(attributes-to-props): fix type issues
The value of
<option>
tags of<select>
are fixed. Converting theirvalue=
todefaultValue=
results bug if the option label is different from the value. For example:The value of
<select>
's "gte-2" won't get a match and it will fallback to "Less than 1".html-react-parser/lib/attributes-to-props.js
Lines 42 to 49 in cffffc7
The text was updated successfully, but these errors were encountered: