-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Generate_class issue with plotly dahs 0.23.1 and dangerously_set_inner_html #321
Comments
I think |
Hm, did the latest IDE stuff break the existing components? If so, we should make a new release that is backwards compatible, i.e. doesn't break the existing components that are out there. |
Yes, I think there is some errors in how the classes generates the constructor arguments you can see the invalid part |
@rmarren1 - Could you check this out too? |
I found the issue with dash/dash/development/base_component.py Lines 376 to 381 in 1f27bac
Should change the |
For the dangerously set inner html, we have to remove the dash/dash/development/base_component.py Line 369 in 1f27bac
There is already a ',' before the kwargs at dash/dash/development/base_component.py Line 306 in 1f27bac
|
I got this bit working: if 'children' in props:
prop_keys.remove('children')
default_argtext = "children=None "
# pylint: disable=unused-variable
argtext = 'children=children, **args'
else:
default_argtext = ""
argtext = '**args'
default_argtext = ", ".join([default_argtext] if default_argtext else [] +
[('{:s}=Component.REQUIRED'.format(p)
if props[p]['required'] else
'{:s}=Component.UNDEFINED'.format(p))
for p in prop_keys
if p and not p.endswith("*") and
p not in ['dashEvents', 'fireEvent', 'setProps']]
) But it's not pretty. |
I'll get a patch for this issue soon, it's looks to be breaking on the edge case where a component has no props. |
I left some comments in #319, it looks to be a pre-existing issue that wasn't raised until 0.23.1 |
After updating to 0.23.1, the following code importing "dangerously_set_inner_html" does not work anymore. It seems that some field may be missing / not set correctly and that this is field is used in an exec statement. The same import is working with previous release.
Error:
The text was updated successfully, but these errors were encountered: