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

[BUG] The dash component generation doesn't work for hyphenated props #2843

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

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
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants