1

Questn1: Hi I want to display select value without label why because am using select value inside the table. I have added image for more Information [Highlighted through red mark]

Questn 2: Visual force page contains selectList.In lightning how can we use select List?

  <table >
    <tr class="slds-text-title--caps">
        <th class="head"><I>Action</I></th>
        <th class="head"><I>Object Name</I></th>
        <th class="head"><I>Component</I></th>
        <th class="head"><I>Operator</I></th> 
        <th class="head"><I>Special Operator</I></th>
        <th class="head"><I>Special Operator * Value</I></th>
        <th class="head"><I>Special Operator / Value</I></th>
    </tr>
    <aura:iteration items="{!v.wrplst}" var="c">
    <tr>
        <td class="cell" >
            <p> 
                <ui:inputText value="{Action}"  /> </p>   
        </td>

        <td class="cell" >

            <p> 
           <ui:inputSelect  value="{!v.options}" class="dynamic" aura:id="InputSelectDynamic" /> 

            </p>
        </td>


        <td class="cell" >
            <p> 
                <ui:inputText value="{Component}"  /> </p>   
        </td>


        <td class="cell" >
            <p> 
                 **<lightning:select name="selectItem" label="Select an item" onchange="{!c.opChange}" >
                    <option value="None">None</option>
                    <option value="+ Addition">+ Addition</option>
                    <option value="- Subtract  ">- Subtract</option>
                    <option value="* Multiply ">* Multiply</option>
                    <option value="/ Divide">/ Divide</option>
                </lightning:select>**
            </p>   
        </td>

        <td class="cell" >
            <p> 
                **<lightning:select name="selectItem" label="Select an item" >
                    <option value="None">None</option>
                    <option value="*">*</option>
                    <option value="*/">*/</option>
                    <option value="/">/</option>
                </lightning:select>**

            </p>          
          </td>

        <td class="cell" >
            <p> 
                 <ui:inputText value="{!c.specialOperatorValue}"/> 
            </p>
        </td>

        <td class="cell" >
            <p> 
               <ui:inputText value="{!c.specialOperatorSlashValue}"/></p>   
        </td>
    </tr>

    </aura:iteration> 
</table>

enter image description here

2

To avoid label being displayed on the screen you can assign blank string to label

<lightning:select label=""/>

Lightning select list version is not currently available and only picklist values are supported .

6

To avoid label use variant="label-hidden"

<lightning:select variant="label-hidden"/>
2

Unfortunately setting label to "" still reserves space for the label and causes allignment issues. Summer 18 added attribute variant="label-hidden", but unfortunately that still reserves the space. The workaround in the meantime is to add attribute class="label-hidden" with CSS:

.THIS .label-hidden > label {
    display: none;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.