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
let columnDefs = [ | |
{ | |
headerName: 'Athlete', | |
field: 'athlete', | |
tooltipField: 'athlete' | |
}, | |
... | |
] |
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
let columnDefs = [ | |
{ | |
headerName: 'Athlete', | |
field: 'athlete', | |
tooltipField: 'athlete' | |
}, | |
... | |
] |
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
let columnDefs = [ | |
{ | |
field: "age", | |
width: 90, | |
filter: 'agNumberColumnFilter', | |
filterParams: { | |
filterOptions: [ | |
'greaterThan', | |
{ | |
displayKey: 'greaterThanWithNulls', |
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
let columnDefs = [ | |
{ | |
field: "age", | |
width: 90, | |
filter: 'agNumberColumnFilter', | |
filterParams: { | |
filterOptions: [ | |
'lessThan', | |
'greaterThan' | |
] |
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
let gridOptions = { | |
loadingCellRenderer: 'customLoadingCellRenderer', | |
components: { | |
customLoadingCellRenderer: CustomLoadingCellRenderer, | |
}, | |
... | |
} |
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
class CustomLoadingCellRenderer { | |
init(params) { | |
const text = 'One moment please...'; | |
this.eGui = document.createElement('div'); | |
this.eGui.innerHTML = | |
'<div class="ag-custom-loading-cell">' + | |
' <i class="fas fa-spinner fa-pulse"></i> <span>' + text + ' </span>' + | |
'</div>'; | |
} |
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
class CustomLoadingCellRenderer { | |
init(params) { | |
this.eGui = document.createElement('div'); | |
this.eGui.innerHTML = | |
'<div class="ag-custom-loading-cell" style="padding-left: 10px; line-height: 25px;">' + | |
' <i class="fas fa-spinner fa-pulse"></i> <span>' + params.loadingMessage + ' </span>' + | |
'</div>'; | |
} | |
getGui() { |
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
let gridOptions = { | |
defaultColDef: { | |
... | |
tooltipComponent: 'customTooltip' | |
}, | |
components: { | |
customTooltip: CustomTooltip, | |
}, | |
... | |
}; |
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
class CustomTooltip { | |
init(params) { | |
var eGui = this.eGui = document.createElement('div'); | |
var color = params.color || 'white'; | |
var data = params.api.getRowNode(params.rowIndex).data; | |
eGui.classList.add('custom-tooltip'); | |
eGui.style['background-color'] = color; | |
eGui.innerHTML = | |
'<p><span class"name">' + data.athlete + '</span></p>' + |
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
this._componentRef = this.createComponent(); | |
this._agAwareComponent = this._componentRef.instance; | |
this._frameworkComponentInstance = this._componentRef.instance; | |
this._eGui = this._componentRef.location.nativeElement; |