7

I am trying to build a lightning component that includes a list builder. The example supplied does not work out of the box as it uses the depreciated svg component. There is no mention of the list builder component in the lightning or ui namespace reference doc.

I found one snippet that calls itself list builder example but for me it did nothing.

What I am looking for is a working example of the above mentioned list builder component including the controller and helper files if they are required. Any assistance would be appreciated!

2 Answers 2

3

I know this is a bit old, but if your problem is with the svg component, you can replace it with the <lightning:icon> component. It will render the svg tag.

You can find more information about the icon component in the following link: https://developer.salesforce.com/docs/component-library/bundle/lightning-icon/documentation

I couldn't find any reference to the List Builder component as well. What I did was to copy the HTML markup from the website you mentioned (Lightning Design System) and replace the svg components with the icon one.

Hope it helps.

1

I'm looking into this too and it appears to be a data table component. I was going through the code provided on the list builder page and it matches the output of a data table component very closely. The elements I'm trying to work through now is adding a button to a data table and having it respond similarly to the list builder example. I see you can add a button to a data table, but I haven't found how to control the onclick of the button yet.

For your specific issue of adding an icon, try using the data table as a bare component and add columns including one for an icon and it should resolve the svg issue

1

You must log in to answer this question.

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