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

dash component generation doesn't work for hyphenated props #2843

Open
tsveti22 opened this issue May 3, 2024 · 1 comment
Open

dash component generation doesn't work for hyphenated props #2843

tsveti22 opened this issue May 3, 2024 · 1 comment
Labels
bug something broken P3 backlog

Comments

@tsveti22
Copy link

tsveti22 commented May 3, 2024

When generating new components using the dash typescript boilerplate, there is an issue with props containing a hyphen. E.g., if I try to generate bindings for a component, which has the "aria-expanded" prop, the generated Python class has "area-expanded" in its parameters, which throws an invalid syntax error, since python variables can't have hyphens.

def __init__(self, children=None, value=Component.REQUIRED, aria-expanded=Component.UNDEFINED, **kwargs):
        self._prop_names = ['children', 'id', 'about', 'accessKey', 'aria-expanded', ]

SyntaxError: invalid syntax

@AnnMarieW
Copy link
Collaborator

AnnMarieW commented May 4, 2024

This topic has been around a long time. Just thought I'd consolidate a couple issues and forum posts that might be helpful - just in case it gets on the roadmap or sponsored.

@gvwilson gvwilson added P3 backlog bug something broken labels Aug 13, 2024
@gvwilson gvwilson changed the title [BUG] The dash component generation doesn't work for hyphenated props dash component generation doesn't work for hyphenated props Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

4 participants