-
Notifications
You must be signed in to change notification settings - Fork 31
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
ui: fix validation for multiselect fields and import from list #2848
Conversation
Signed-off-by: Miguel Garcia Garcia <[email protected]>
marginBottom: "5px", | ||
backgroundColor: "white", | ||
}} | ||
> | ||
<List.Item.Meta | ||
title={ | ||
<Typography.Text ellipsis={{ rows: 1 }}> | ||
<Typography.Text ellipsis> |
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.
why remove {{ rows: 1 }}
? seems not to work for long text
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.
I tried and it seems to work the same, did you notice any issue? For some reason I was getting a warning saying that rows is not a valid property for ellipsis (even though it should be...)
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.
I don't know why but they're excluding rows
and expandable
from the ellipsis props in antd, and in the documentation they appear as valid props (https://github.com/ant-design/ant-design/blob/master/components/typography/Text.tsx#L34)
@@ -23,6 +26,9 @@ const PropertyKeyEditorForm = ({ | |||
} else { | |||
if (uiSchema["ui:widget"]) { | |||
type = uiSchema["ui:widget"]; | |||
if (uiSchema["ui:widget"] === "select") { |
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 a chance we don't have a ui:widget
specified, but RJSF still will render the select widget
e.g.
"multipleChoicesList": {
"type": "array",
"title": "A multiple choices list",
"items": {
"type": "string",
"enum": [
"foo",
"bar",
"fuzz",
"qux"
]
},
"uniqueItems": true
},
do we need to handle better?
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.
We won't have those cases from the builder, only maybe for imported or manually created schemas, but I would say we should have those schemas follow the "form builder syntax" instead of implementing more custom checks that can make the code more confusing. What do you think?
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Closes #2847
Closes #2849