Adding isPureConfig optional property to react-highcharts (#33914)

This commit is contained in:
Chris Guthrie 2019-03-15 13:56:07 -04:00 committed by Wesley Wigham
parent b39dfb3541
commit 8ec70ad7f6
2 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,11 @@ interface ReactHighchartsProps {
* @param after-render callback.
*/
callback?(chart: Highcharts.ChartObject): void;
/**
* Chart will not rerender if the config is referentially equal to previous and this property is true
*/
isPureConfig?: boolean;
}
/**

View File

@ -6,9 +6,12 @@ const config: Highcharts.Options = {};
function callback(chart: Highcharts.ChartObject): void {}
const isPureConfig = true;
export const _ = () => (
<>
<ReactHighcharts config={config} />
<ReactHighcharts config={config} callback={callback} />
<ReactHighcharts config={config} callback={callback} isPureConfig={isPureConfig} />
</>
);