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

Setting optional props with base expr fails without Some(...) #2034

Closed
1 of 3 tasks
Tracked by #2052
Xavientois opened this issue Sep 6, 2021 · 0 comments · Fixed by #2080
Closed
1 of 3 tasks
Tracked by #2052

Setting optional props with base expr fails without Some(...) #2034

Xavientois opened this issue Sep 6, 2021 · 0 comments · Fixed by #2080
Assignees
Labels
A-yew-macro Area: The yew-macro crate bug macro Issues relating to our procedural or declarative macros

Comments

@Xavientois
Copy link
Contributor

Problem

Adding the following test to /yew-macro/tests/html_macro/component-pass.rs fails tests. This is due to the current implementation of property setting with a base expression.

This test passes if the property is wrapped in a Some, but

              <Container int=1 ..props>
                  <Child int=2 opt_str="hello" ..child_props />
              </Container>

Steps To Reproduce
Steps to reproduce the behavior:
Add the above snippet to line 213 of component-pass.rs

Expected behavior
Test passes and optional string it set in prop

Screenshots
Screen Shot 2021-09-06 at 9 00 22 AM

Environment:

  • Yew version: master
  • Rust version: 1.53.0

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later
@Xavientois Xavientois added the bug label Sep 6, 2021
@siku2 siku2 added the macro Issues relating to our procedural or declarative macros label Sep 6, 2021
@mc1098 mc1098 added the A-yew-macro Area: The yew-macro crate label Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew-macro Area: The yew-macro crate bug macro Issues relating to our procedural or declarative macros
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants