2

I have a few lighting-combobox fields that are used as filters. I want to spread them across the page horizontally. I was trying to use a with each filter in a lighting:layoutitem. I looked at the documentation (https://developer.salesforce.com/docs/component-library/bundle/lightning-layout/example) for LWC layout and it shows there is a horizontal align. However, when I enter it,

<lightning:layout horizontal-align="space">

I get an error that its not a valid attribute of lightning:layout. Any help on how I can get a few lightning-combobox fields spread across the page horizontally would be greatly appreciated! thanks!!

Fred

1 Answer 1

5

The example you're looking for is for lightning web components whereas you seem to be writing the code for aura components.

Based on aura's layout component specification, you need to use the valid attribute:

<lightning:layout horizontalAlign="space">
2
  • 1
    good catch!.... Jun 4, 2020 at 17:47
  • 1
    I see now, thanks for pointing me in the right direction! The problem was that I was using lightning:layout when I should have been using lighting-layout. Thank you!
    – Frank
    Jun 4, 2020 at 19:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .