Created
April 10, 2019 11:13
-
-
Save maxkoretskyi/ec58e7f93f96c5bc6722e25506d482a5 to your computer and use it in GitHub Desktop.
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
export class AgGridReact extends React.Component { | |
componentWillReceiveProps(nextProps: any) { | |
const changes = <any>{}; | |
const changedKeys = Object.keys(nextProps); | |
changedKeys.forEach((propKey) => { | |
... | |
if (!this.areEquivalent(this.props[propKey], nextProps[propKey])) { | |
changes[propKey] = { | |
previousValue: this.props[propKey], | |
currentValue: nextProps[propKey] | |
}; | |
} | |
}); | |
AgGrid.ComponentUtil.getEventCallbacks().forEach((funcName: string) => { | |
if (this.props[funcName] !== nextProps[funcName]) { | |
changes[funcName] = { | |
previousValue: this.props[funcName], | |
currentValue: nextProps[funcName] | |
}; | |
} | |
}); | |
AgGrid.ComponentUtil.processOnChange(changes, this.gridOptions, this.api, this.columnApi); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was looking for this code on several websites but finally found on this site.. Thank you it solved the code on my websites do my online class & take my class online for me