File tree Expand file tree Collapse file tree 6 files changed +35
-5
lines changed
Expand file tree Collapse file tree 6 files changed +35
-5
lines changed Original file line number Diff line number Diff line change 136136 < ui5-segmented-button id ="sb ">
137137 < ui5-toggle-button icon ="employee " pressed > Small</ ui5-toggle-button >
138138 < ui5-toggle-button > Medium</ ui5-toggle-button >
139- < ui5-toggle-button > Largr </ ui5-toggle-button >
139+ < ui5-toggle-button > Large </ ui5-toggle-button >
140140 </ ui5-segmented-button >
141141 </ div >
142142 </ div >
Original file line number Diff line number Diff line change @@ -631,7 +631,7 @@ <h2>Wizard non-standard 3</h2>
631631 < ui5-segmented-button id ="sb2 ">
632632 < ui5-toggle-button icon ="employee " pressed > Small</ ui5-toggle-button >
633633 < ui5-toggle-button > Medium</ ui5-toggle-button >
634- < ui5-toggle-button > Largr </ ui5-toggle-button >
634+ < ui5-toggle-button > Large </ ui5-toggle-button >
635635 </ ui5-segmented-button >
636636 </ div >
637637 </ div >
Original file line number Diff line number Diff line change 117117 < ui5-segmented-button >
118118 < ui5-toggle-button icon ="employee " pressed > Small</ ui5-toggle-button >
119119 < ui5-toggle-button > Medium</ ui5-toggle-button >
120- < ui5-toggle-button > Largr </ ui5-toggle-button >
120+ < ui5-toggle-button > Large </ ui5-toggle-button >
121121 </ ui5-segmented-button >
122122 </ div >
123123 </ div >
Original file line number Diff line number Diff line change 120120 < ui5-segmented-button id ="sb ">
121121 < ui5-toggle-button icon ="employee " pressed > Small</ ui5-toggle-button >
122122 < ui5-toggle-button > Medium</ ui5-toggle-button >
123- < ui5-toggle-button > Largr </ ui5-toggle-button >
123+ < ui5-toggle-button > Large </ ui5-toggle-button >
124124 </ ui5-segmented-button >
125125 </ div >
126126 </ div >
285285 < ui5-segmented-button >
286286 < ui5-toggle-button icon ="employee " pressed > Small</ ui5-toggle-button >
287287 < ui5-toggle-button > Medium</ ui5-toggle-button >
288- < ui5-toggle-button > Largr </ ui5-toggle-button >
288+ < ui5-toggle-button > Large </ ui5-toggle-button >
289289 </ ui5-segmented-button >
290290 </ div >
291291 </ div >
Original file line number Diff line number Diff line change @@ -199,6 +199,27 @@ describe("General API", () => {
199199 . and ( "have.prop" , "emptySpanXl" , 1 ) ;
200200 } ) ;
201201
202+ it ( "tests calculated state of Form item-spacing='Large'" , ( ) => {
203+ cy . mount ( < Form id = "addressForm" item-spacing = "Large" >
204+ < FormGroup id = "formGroup" >
205+ < FormItem id = "formItem" >
206+ < Label slot = "labelContent" > Name:</ Label >
207+ < Text > Red Point Stores</ Text >
208+ </ FormItem >
209+
210+ < FormItem >
211+ < Label slot = "labelContent" > Country:</ Label >
212+ < Text > Germany</ Text >
213+ </ FormItem >
214+ </ FormGroup >
215+ </ Form > ) ;
216+
217+ cy . get ( "#formGroup" )
218+ . should ( "have.prop" , "itemSpacing" , "Large" ) ;
219+ cy . get ( "#formItem" )
220+ . should ( "have.prop" , "itemSpacing" , "Large" ) ;
221+ } ) ;
222+
202223 it ( "tests calculated state of two FormGroups in layout='S1 M2 L3 XL4'" , ( ) => {
203224 cy . mount ( < Form headerText = "WebC :: Supplier 2gr (S1 M2 L3 XL4)" layout = "S1 M2 L3 XL4" >
204225 < FormGroup id = "testFormGroup4" headerText = "Address" >
Original file line number Diff line number Diff line change @@ -342,6 +342,9 @@ class Form extends UI5Element {
342342
343343 // Define how many columns a group should take.
344344 this . setGroupsColSpan ( ) ;
345+
346+ // Set item spacing
347+ this . setItemSpacing ( ) ;
345348 }
346349
347350 onAfterRendering ( ) {
@@ -489,6 +492,12 @@ class Form extends UI5Element {
489492 return index === 0 ? MIN_COL_SPAN + ( delta - groups ) + 1 : MIN_COL_SPAN + 1 ;
490493 }
491494
495+ setItemSpacing ( ) {
496+ this . items . forEach ( ( item : IFormItem ) => {
497+ item . itemSpacing = this . itemSpacing ;
498+ } ) ;
499+ }
500+
492501 get hasGroupItems ( ) : boolean {
493502 return this . items . some ( ( item : IFormItem ) => item . isGroup ) ;
494503 }
You can’t perform that action at this time.
0 commit comments