Skip to content

Instantly share code, notes, and snippets.

@svierk
Last active January 25, 2024 14:24
Show Gist options
  • Save svierk/013afda6b603b75a95640873b05dc2ae to your computer and use it in GitHub Desktop.
Save svierk/013afda6b603b75a95640873b05dc2ae to your computer and use it in GitHub Desktop.
JS Code for Content Document Table Extension LWC
import LightningDatatable from 'lightning/datatable';
import contentDocumentIcon from './contentDocumentIcon.html';
import contentDocumentPreview from './contentDocumentPreview.html';
export default class ContentDocumentTableExtension extends LightningDatatable {
static customTypes = {
contentDocumentIcon: {
template: contentDocumentIcon,
standardCellLayout: true,
typeAttributes: ['icon']
},
contentDocumentPreview: {
template: contentDocumentPreview,
standardCellLayout: true,
typeAttributes: ['preview']
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment