For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
I'd use oj-form-layout to manage this (using the label-hint attributes to provide the labels) then you should get much better responsive management
Hallo Duncan,
How could we ensure that a filepicker has the same width as input fields on a page? We’ve tried controling width with:
None of the methods provide a solution. Any advice or suggestions would be highly appreciated.
Thanks,
Hugo
When sizing the file picker you need to use max-width as is documented in the cookbook sample for the same:
https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=filePicker&demo=width
Thank you for pointing out that the filepicker width can be set using max-width. I've applied this but I can only get the max-width to take effect when I add "!important". Also effective I would like to apply a more elegant solution that does not use "!important".
I’ve tried several variations without using “important” for the max-width where I’ve put the filepicker in a grid row and flex row (see image), but without success. Do you have any further suggestions?
Thanks,
Hugo
See this demo online https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=filePicker&demo=width
As you can see this works without !important just fine which indicates that something else in your styling is actually causing that problem. Check in Dev tools and see what is causing the override. It might be worth starting a separate thread as well as this one seems to be covering multiple issues now.
Hello Duncan,
Using the oj-form-layout we solved the issue of differently scaling components but vertical alignment is still not optimal. When we place two oj-forms in different flex rows and choose justify centre on both rows they are slightly out of line vertically. Is there a way to set vertical alignment when using multiple oj-form-layout sections on the same page?
We also tried to use the label-hints but we don’t see what it does, could you clarify?
Thanks.
When you use a oj-form-layout you don't need to specify separate oj-label components. If you set a label-hint property on the input component the oj-form-layout will create and locate the label for you in the correct place and set up the accessibility relationship between the generated label and the input.
Do you have a screenshot of the misalignment?
When recreating the issue in an example we discovered the cause. When one of the labels is larger, it causes the other components in the oj-form-layout to be displaced. Are there other solutions than reducing the length of the labels?
The use of the label-hint property is clear now, but it does not solve this issue either.
You can configure the form-layout to give a particular amount of space to the labels
Check out the doc. https://docs.oracle.com/en/middleware/developer-tools/jet/7.1/reference-api/oj.ojFormLayout.html
By setting these consistently for all the forms and having the same overall size for the form then the layouts should all align
Thanks for the tip. I've managed to solve the vertical alignment issue by applying a css class to the form layout elements themselves which sets the width to 20%.
I'd use oj-form-layout to manage this (using the label-hint attributes to provide the labels) then you should get much better responsive management