Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
// Get JS globals
let GLOBALS = {};
try {
const globalsEl = document.getElementById('js-globals');
if (globalsEl) {
GLOBALS = JSON.parse(globalsEl.textContent);
}
} catch (err) {
logError(err);
}
window.GLOBALS = GLOBALS;
// Set App element (used for react-SLDS modals)
settings.setAppElement(el);
ReactDOM.render(
,
el,
onSelect={item => {
console.log(item, " Selected");
}}
options={[
{type: "section", label: "SECTION 1"},
{label: "Paddy's Pub"},
{label: "Tyrell Corp"},
{type: "section", label: "SECTION 2"},
{label: "Paper St. Soap Company"},
{label: "Nakatomi Investments"},
{label: "Acme Landscaping"},
{type: "section", label: "SECTION 3"},
{label: "Acme Construction"},
]}
sectionDividerRenderer={
Lookup.DefaultSectionDivider
}
/>
<div>
{
const selection =
data.selection.length === 0
? this.state.leadSourceSelection
: data.selection;
console.log(
"selected: ",
selection[0].label
);
this.setState({</div>
const ClickableDataTableCell = ({children, ...props}) => {
return (
<div>
<a> {
props.onClick(props.item);
}}
style={{cursor: "pointer"}}>
{children}
</a>
</div>
);
};
ClickableDataTableCell.displayName = DataTableCell.displayName;
const ImageDataTableCell = ({children, ...props}) => {
return (
<img style="{{maxWidth:" alt="" src="{props.item[props.property]}">
);
};
ImageDataTableCell.displayName = DataTableCell.displayName;
<div style="{{alignItems:">
<div>{children}</div>
<div> commentableRecord.setDom(c)}
style={{marginLeft: 5}}>
</div>
</div>
);
};
CommentableDataTableCell.displayName = DataTableCell.displayName;
const ClickableDataTableCell = ({children, ...props}) => {
return (
<div>
<a> {
props.onClick(props.item);
}}
style={{cursor: "pointer"}}>
{children}
</a>
</div>
);
};
DataTableCell,
DataTableColumn,
Spinner,
} from "@salesforce/design-system-react";
const ClickableDataTableCell = ({children, ...props}) =>
<div> {
props.onClick(props.item);
}}
style={{cursor: "pointer"}}>
<a>{children}</a>
</div>
;
ClickableDataTableCell.displayName = DataTableCell.displayName;
const LabelDataTableCell = ({children, ...props}) =>
<div> {
props.onClick(props.item);
}}
style={{cursor: "pointer"}}>
<a>{decode(props.item.label)}</a>
</div>
;
LabelDataTableCell.displayName = DataTableCell.displayName;
const MomentDataTableCell = ({children, ...props}) =>
<a>{decode(props.item.label)}</a>
;
LabelDataTableCell.displayName = DataTableCell.displayName;
const MomentDataTableCell = ({children, ...props}) =>
<div> {
props.onClick(props.item);
}}
style={{cursor: "pointer"}}>
<a>{decode(moment(props.item.lastModifiedDate).fromNow())}</a>
</div>
;
MomentDataTableCell.displayName = DataTableCell.displayName;
const FolderDataTableCell = ({children, ...props}) =>
<a>{decode(props.item.folder.label)}</a>
;
FolderDataTableCell.displayName = DataTableCell.displayName;
const HEIGHT = 500;
export default class DashboardPicker extends React.Component {
static propTypes = {
dashboards: PropTypes.array,
totalDashboardLength: PropTypes.number,
isFiltering: PropTypes.bool,