Skip to content
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

list value is not preserved while parsing and rendering in UI. #839

Closed
Vinay-Kurapati opened this issue Feb 16, 2023 · 2 comments · Fixed by #852 or #853 · May be fixed by X-oss-byte/gatsby-1#782, X-oss-byte/gatsby-1#795 or X-oss-byte/gatsby-1#825
Assignees
Labels
bug Something isn't working

Comments

@Vinay-Kurapati
Copy link

Expected Behavior

When a list item has a value attribute, the value is not preserved parsing and rendering in UI.
Ex:

  1. Item-3

Actual Behavior

It should preserve the list value.

  1. Item-3

Steps to Reproduce

Please check the below link

Reproducible Demo

https://codesandbox.io/s/loving-violet-2gicem?file=/src/App.js

Environment

  • Version: 3.0.9
@Vinay-Kurapati Vinay-Kurapati added the bug Something isn't working label Feb 16, 2023
@remarkablemark
Copy link
Owner

remarkablemark commented Mar 4, 2023

Thanks for opening this issue @Vinay-Kurapati. I can reproduce this bug in your demo. The root cause is from this line: https://github.com/remarkablemark/html-react-parser/blob/v3.0.10/lib/attributes-to-props.js#L50

The attribute value is being transformed to defaultValue:

Screen Shot 2023-03-03 at 8 20 42 PM

@remarkablemark
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment