-
Notifications
You must be signed in to change notification settings - Fork 4
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
field options seem to not have effect #2
Comments
the defaults are set in the collection item view. I have to think about a generic improvement solution |
Seems solved in Cockpit field layout as per other thread discussion there |
Is this fixed? A look at the Response shows that the styles of an image does not get output: components.js {
"custom_image": {
"label": "Custom Image",
"dialog": "normal",
"children": false,
"fields": [
{
"name": "image",
"label": "Image",
"type": "asset",
"default": "",
"info": "",
"group": "",
"localize": false,
"width": "1-1",
"lst": true,
"acl": [],
"options": {
"styles": [
"Default",
"Placeholder"
]
}
}
],
"group": "media"
}
} Response {
"component": "custom_image",
"settings": {
"id": "",
"class": "",
"style": "",
"image": {
"path": "\/2019\/01\/24\/5c49eeada1071slide5.jpg",
"title": "slide5.jpg",
"mime": "image\/jpeg",
"description": "",
"tags": [],
"size": 262747,
"image": true,
"video": false,
"audio": false,
"archive": false,
"document": false,
"code": false,
"created": 1548349101,
"modified": 1548351106,
"_by": "5c49dd3c3361356bf0000243",
"width": 1600,
"height": 1069,
"colors": [
"#cbcbcb",
"#272727",
"#585858",
"#7a7a7a",
"#646464"
],
"folder": "",
"_id": "5c49eeae34366200290003b1"
}
}
} |
Hey @mortensassi , the original issue was not related with image styles (styles are provided by custom addon), but with passing defaults to custom components fields, e.g.: default value of a textfield, dropdown, etc.. can you kindly open an issue on the image styles addon? |
When defining custom components and using options (e.g. required, default inside a set) they seem to be ignored:
Initially was thinking that was an issue on cockpit core but then realized that was working for collection fields (the reason that I opened agentejo/cockpit#965 and then closed - the PR changes make it work)!
Any ideas?
The text was updated successfully, but these errors were encountered: