From bc0c04873541a23a137eff682f21a5ad4560f192 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sun, 28 Oct 2018 17:35:16 +0800 Subject: [PATCH] try to fix #620 --- packages/react-bootstrap-table2/src/bootstrap-table.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/react-bootstrap-table2/src/bootstrap-table.js b/packages/react-bootstrap-table2/src/bootstrap-table.js index 2bf37a3..0c5c862 100644 --- a/packages/react-bootstrap-table2/src/bootstrap-table.js +++ b/packages/react-bootstrap-table2/src/bootstrap-table.js @@ -15,13 +15,12 @@ class BootstrapTable extends PropsBaseResolver(Component) { super(props); this.validateProps(); if (props.registerExposedAPI) { - const getData = () => this.getData(); - props.registerExposedAPI(getData); + props.registerExposedAPI(this.getData); } } // Exposed APIs - getData = () => { + getData() { return this.props.data; }