GithubHelp home page GithubHelp logo

rapsacnz / dualselect Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 8.0 28 KB

A two column option selector. Similar to the Duelling Picklist built in lightning component. Aura.

License: The Unlicense

JavaScript 99.51% CSS 0.49%

dualselect's People

Contributors

rapsacnz avatar vc4u avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dualselect's Issues

Setting left / right values does not update component

I've added the DualSelect component to a wrapper component:

<aura:component implements="forceCommunity:availableForAllPageTypes" access="global">

    <aura:attribute name="leftValues" type="Object[]" access="public" default="[]" />
    <aura:attribute name="rightValues" type="Object[]" access="public" default="[
           {
           'label': 'Annual Review',
           'value': 'Annual Review'
           },
           {
           'label': 'Initial Contact',
           'value': 'Initial Contact'
           },
           {
           'label': 'Application',
           'value': 'Application'
           }]" />
    
    <aura:handler name="init" action="{!c.doInit}" value="{!this}" />        

    <div class="slds">
        <div class="slds-box">
            <c:DualSelect fieldName="Skills" leftValues="{!v.leftValues}" rightValues="{!v.rightValues}" />
        </div>
    </div>
</aura:component>
({
    doInit : function(component, event, helper) {
    
    	var leftValues = component.get("v.leftValues");
    	
    	leftValues.push({
           'label': 'Annual Review',
           'value': 'Annual Review'
           });
		
		component.set("v.leftValues", leftValues);
    } 
})

The right side shows the 3 initial values OK, but the left side does not. If I inspect the leftSide attribute, the values are in there, but the component doesn't seem to know about them, or at least fails to update the UI with those values.

Do I have to fire an event to get them show up? If so, would you mind providing an example?

Thanks again!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.