-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
dcc: refactor input #3398
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
base: v4
Are you sure you want to change the base?
dcc: refactor input #3398
Conversation
2b47c08
to
5a49f13
Compare
d7fa1ac
to
01dac37
Compare
01dac37
to
1653281
Compare
values = str([v["value"] for v in prop_info["value"]]) | ||
return f"pt.oneOf({values})" | ||
values = [v["value"] for v in prop_info["value"] if v.get("value") is not None] | ||
return f"pt.oneOf([{",".join(v for v in values)}])" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes doubly-quoted strings in an enum of string literals
ffdf944
to
99e0e91
Compare
99e0e91
to
7ec85f3
Compare
1b336c2
to
0c175f5
Compare
4f6b763
to
4a81cbe
Compare
2367abf
to
11d7d36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just some minor comments.
* | ||
* See: https://dash.plotly.com/loading-states#check-loading-states-from-components | ||
*/ | ||
function LoadingElement({children}: LoadingElementProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already a LoadingElement in js form, do we need both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one, in typescript, is a slightly different pattern. So once all the components are migrated, I will remove the js version of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, maybe we can consolidate both, the whole idea behind the LoadingElement was to remove code duplication between the different components where the only difference was the html tag used (so we take it as prop and createElement).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, can consolidate the loading element later on.
In this PR:
dcc.Input
to be a function-component written in Typescript and with new CSS rules applied. (update dcc.Input #3386)Contributor Checklist
optionals
CHANGELOG.md