Created
January 27, 2024 08:13
-
-
Save svierk/18fcec1d3dfeb7357ccb938f049c9eb6 to your computer and use it in GitHub Desktop.
JS Code for Content Document Table LWC | Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ICONS = { | |
csv: 'doctype:csv', | |
default: 'doctype:attachment', | |
docx: 'doctype:word', | |
jpeg: 'doctype:image', | |
jpg: 'doctype:image', | |
pdf: 'doctype:pdf', | |
png: 'doctype:image', | |
pptx: 'doctype:ppt', | |
rtf: 'doctype:rtf', | |
txt: 'doctype:txt', | |
xlsx: 'doctype:excel', | |
xml: 'doctype:xml', | |
zip: 'doctype:zip' | |
}; | |
const COLUMNS = [ | |
{ | |
label: '', | |
fieldName: 'icon', | |
type: 'contentDocumentIcon', | |
hideDefaultActions: true, | |
fixedWidth: 40 | |
}, | |
{ | |
label: 'Title', | |
fieldName: 'preview', | |
type: 'contentDocumentPreview', | |
hideDefaultActions: true | |
}, | |
{ | |
label: 'Size', | |
fieldName: 'ContentSize', | |
hideDefaultActions: true, | |
initialWidth: 80, | |
cellAttributes: { alignment: 'right' } | |
}, | |
{ | |
label: 'Created', | |
fieldName: 'CreatedDate', | |
type: 'date', | |
hideDefaultActions: true, | |
initialWidth: 100 | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment