Anyone know how to get the <lightning:select>
options to be formatted like they are supposed to be?
Simple example below placed in the right side gf the Account lightning page
Lightning App
<aura:component description="myExampleComponent" implements="flexipage:availableForAllPageTypes,force:hasRecordId"
access="global">
<lightning:select name="sel" label="try Me" >
<option value="1">First</option>
<option value="2">Second</option>
</lightning:select>
</aura:component>
Result when in LEX and showing options:
When in the account and creating an opportunity using default SF LEX UI the StageName options look like this:
Is there any way to get the options for the <lightning:select>
to appear like they do when using salesforce provided components? I would think that the lightning select options was supposed to be styled like the lightning select not just the select input.
Best Answer
I would expect components in the
lightning
namespace to match the LEX design in the future, even though we can't say when/if this will happen.In the meantime, the guys at Appiphony have made a great job creating components that match the SLDS look & feel.
Have a look at the Strike components, in this case the Strike Select one, which is exactly what you want. These are free and open source. In the future, when
lightning:select
will be matching the LEX UI, you'll just have to replace the strike component by the standard one.