-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
59 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import _ from 'lodash'; | ||
import React from 'react'; | ||
import {ValueFormatterFunc} from 'ag-grid-community'; | ||
|
||
export const getTextCellRenderer = (formatter: ValueFormatterFunc<any>) => { | ||
const TextCellRenderer = (props: any) => { | ||
return <span>{formatter(props)}</span>; | ||
}; | ||
return TextCellRenderer; | ||
}; | ||
|
||
export const LinkCellRenderer = (props: any) => { | ||
return <a href={props.value}>{props.value}</a>; | ||
}; | ||
|
||
export const Base64PNGDisplayer = (props: any) => { | ||
const imgString = 'data:image/png;base64,' + props.value; | ||
return <img src={imgString}></img>; | ||
}; | ||
|
||
export const SVGDisplayer = (props: any) => { | ||
const markup = {__html: props.value}; | ||
|
||
return ( | ||
<div //style={{border:'1px solid red', borderBottom:'1px solid green'}} | ||
dangerouslySetInnerHTML={markup} | ||
></div> | ||
); | ||
}; |
This file contains 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
This file contains 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