Skip to content

Instantly share code, notes, and snippets.

@dhaniksahni
Created October 10, 2019 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhaniksahni/aee3cc862fc6ce05b4e837882a572079 to your computer and use it in GitHub Desktop.
Save dhaniksahni/aee3cc862fc6ce05b4e837882a572079 to your computer and use it in GitHub Desktop.
Extend Lightning Web Component Data Table
<template>
<c-image-control url={value}
alt-text="Image Not Found">
</c-image-control>
</template>
import LightningDatatable from 'lightning/datatable';
import imageTableControl from './imageTableControl.html';
export default class SalesforceCodexDataTable extends LightningDatatable {
static customTypes = {
image: {
template: imageTableControl
}
};
}
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="salesforceCodexDataTable">
<apiVersion>46.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightningCommunity__Page</target>
<target>lightningCommunity__Default</target>
</targets>
</LightningComponentBundle>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment