-
Notifications
You must be signed in to change notification settings - Fork 376
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
Handle primitive labeling in angular-material MasterListComponent #1779
Comments
Hi @JBBianchi, thanks for creating this issue. We wrote the Instead of calling I'm just wondering, what is the use case of using |
Hello @sdirix
Indeed, that makes sense.
Unfortunatly, from what I understood of the renderer set table (and after trying it out), the 'simple' list isn't supported/working in angular. By providing the following JSON Schema in the Angular seed: JSON Schema {
"type":"object",
"properties":{
"strings":{
"title":"Array of strings",
"type":"array",
"items":{ "type" : "string" }
},
"objects":{
"title":"Array of objects",
"type":"array",
"items":{
"type" : "object",
"properties": {
"some-prop": {
"type": "string"
},
"another-prop": {
"type": "string"
}
}
}
}
}
} And the following UI Schema: {
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/strings"
}
]
} It renders an empty table. (In some configuration, it will render a container with a single input but no button to add/remove items, I'll try to edit/reply if I find a way to reproduce it.) (it's the same behavior if the scope was |
The renderer set overview is actually wrong there and is missing the "checkmark" for Angular Material here. Primitive values in arrays work just fine, however the renderer is missing a way to
To see the existing renderer in some capacity with your provided schemas you need to also provide the data. So changing export default {
strings: ["string1", "string2"]
}; |
I see (the same can also be achieved by providing a |
I extracted this into a separate issue: #1782 |
The MasterListComponent did only show labels for object lists. Furthermore the options property in the uischema was mandatory. Also the property to use as label for objects had to be provided. The fix now handles primitives, a missing options property and in the case of a missing `labelRef` the first primitive property is used. If no primitive property is available the first property in the schema is used. Fix eclipsesource#1779
The MasterListComponent did only show labels for object lists. Furthermore the options property in the uischema was mandatory. Also the property to use as label for objects had to be provided. The fix now handles primitives, a missing options property and in the case of a missing `labelRef` the first primitive property is used. If no primitive property is available the fallback text 'No label set' will be shown. Fix eclipsesource#1779
The Angular MasterListComponent did only show labels for object lists. Furthermore the options property in the uischema was mandatory. Also the property to use as label for objects had to be provided. The fix now handles primitives, a missing options property and in the case of a missing `labelRef` the first primitive property is used. If no primitive property is available the fallback text 'No label set' will be shown. Fix #1779
Is your feature request related to a problem? Please describe.
When using a
ListWithDetail
on an array of strings, the label stays undefined even if theoptions.labelRef
is set to#
.Describe the solution you'd like
I'd like the label to be the value of the item. This could be achieved by modifiying the following in master.ts
Describe alternatives you've considered
Using "my own" version of
MasterListComponent
.Framework
Angular
RendererSet
Material
Additional context
No response
The text was updated successfully, but these errors were encountered: