oracle / oraclejet

Oracle JET is a modular JavaScript Extension Toolkit for developers working on client-side applications.

Home Page:https://oracle.com/jet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

user-assistance-density default value needs to be explicitly set for nested oj-form-layout components

pentzzsolt opened this issue · comments

Using JET 9.0.0, Redwood theme, given the following markup:

<oj-form-layout class="oj-formlayout-full-width">
  <oj-input-number label-hint="test" required="true"></oj-input-number>
  <oj-input-number label-hint="test2" required="true"></oj-input-number>
  <oj-form-layout class="oj-formlayout-full-width" max-columns="2">
    <oj-select-single label-hint="test3" required="true"></oj-select-single>
    <oj-select-single label-hint="test4" required="true"></oj-select-single>
  </oj-form-layout>
  <oj-input-date-time label-hint="test5" required="true"></oj-input-date-time>
</oj-form-layout>

After filling out the fields in the nested <oj-form-layout> component, the spacing between those fields and the one under them collapses.
Explicitly setting user-assistance-density to the default value efficient on either the outer or the inner <oj-form-layout> component fixes this issue.

Hi, this sounds like a bug. user-assistance-density attribute is new in v9.0.

user-assistance-density defaults to 'efficient' when it is inside an oj-form-layout, and 'reflow' when not inside of an oj-form-layout.
It sounds like something is happening with oj-select-single when you fill it out that causes the user-assistance-density to default back to 'reflow'. Perhaps it is refreshing itself and that blows away the way the property binding defaulting mechanism.
I'll take a look. It sounds easily reproducible.
Thanks for reporting it.

Jeanne

I took a look at it and it is an easy-to-fix bug with nesting oj-form-layout and the propagation of the user-assistance-density.