• Vinay Kumar Vemula
  • NEWBIE
  • 5 Points
  • Member since 2016
  • Salesforce Certified Developer


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 8
    Replies
Hi All,

I'm unable to create Multi-select picklist in .design class in lightning component with design:attribute, Its not allowing to add datasource to that Multi-select picklist.

Error I got is: Failed to save MyComponent.design: Only String attributes may have a datasource in the design file.: Source

My code is:
MyComponent.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes">
    
    <aura:attribute name="MyVelues" type="String[]" />
</aura:component>
MyComponent.design
<design:component label="MyComponent">

    <design:attribute name="MyVelues" datasource="value1,value2,value3" default="value1" />
    
</design:component>
If anyone could help it would be appreciated.
Thanks,
Vinay
 
Hi All,

I'm unable to create Multi-select picklist in .design class in lightning component with design:attribute, Its not allowing to add datasource to that Multi-select picklist.

Error I got is: Failed to save MyComponent.design: Only String attributes may have a datasource in the design file.: Source

My code is:
MyComponent.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes">
    
    <aura:attribute name="MyVelues" type="String[]" />
</aura:component>
MyComponent.design
<design:component label="MyComponent">

    <design:attribute name="MyVelues" datasource="value1,value2,value3" default="value1" />
    
</design:component>
If anyone could help it would be appreciated.
Thanks,
Vinay
 
I'm implementing a map in a lightning component by using leaflet. I'm getting a popup error in firefox:
"[cannot use the given object as a weak map key]" 

Same is working just fine in chrome and edge.

I've stripped all my code in controller and left only the leaflet and map div. Seems like the problem is in leaflet.js

So this all I have:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global">
    <ltng:require styles="/resource/leaflet/leaflet.css"
        		  scripts="/resource/leaflet/leaflet.js"/>
        
    <div id="map" aura:id="map" class="slds-card map"  ></div>
</aura:component>

Any thoughts?
 
Hello, 

I am coding a component that create a map with the leaflet API (http://leafletjs.com/examples/quick-start/).

The code is based on this example (https://developer.salesforce.com/blogs/developer-relations/2015/04/creating-salesforce-lightning-map-component.html).
Sightly modified to checked first if coordinates are given and if not uses the current User coordinates.

Everything is working fine on Chrome browser and old Firefox version (up to 48.0 included). For the version 49.0 to 55.0 of Firefox, it is not working.
It returns the following error :
TypeError cannot use the given object as a weak map key.

Did someone already got the same error ? Does someone know how to solve this?

Thanks.
Hi, I am having trouble with the "Attributes and Expressions" module from trailhead.

Here is the challenge:
Create a Lightning Component to display a single item for your packing list.
  • Create a component called campingListItem that displays the name (ui:outputText) and the three custom fields using the appropriate output components.
  • Add an attribute named 'item' for type Camping_Item__c.
I created an component named campingListItem and this is the code:
<aura:component >
    <aura:attribute name="item" type="<my_domain>__Camping_Item__c"/>
    
    <ui:outputText value="{!v.item.Name}"/>
    <ui:outputCheckbox value="{!v.item.<my_domain>__Packed__c}"/>
    <ui:outputCurrency  value="{!v.item.<my_domain>__Price__c}"/>
    <ui:outputNumber value="{!v.item.<my_domain>__Quantity__c}"/>
</aura:component>

The error that I am getting is: "Challenge Not yet complete... here's what's wrong: 
The packingListItem Lightning Component's attribute tag doesn't exist or its attributes are not set correctly."

With this, I tried to create another component, with the name "packingListItem", but It didn't work.

Can anyone help me?

Thanks,