Commit 9812eaf8 authored by Marjolaine Bodin's avatar Marjolaine Bodin
Browse files

#507 remote as prop

parent 9410f400
Pipeline #49598 passed with stage
in 2 minutes and 50 seconds
......@@ -275,16 +275,17 @@ function InvestigationTable(props) {
startValue={startDate}
onStartDayChange={handleStartDateChange}
onStartClear={handleStartDateClear}
startPlaceHolder={'startDate'}
startPlaceHolder={'Filter between dates'}
endValue={endDate}
onEndDayChange={handleEndDateChange}
onEndClear={handleEndDateClear}
endPlaceHolder={'endDate'}
endPlaceHolder={'Filter between dates'}
showStatisticsMenu={showStatisticsMenu}
instrumentName={instrumentName}
/>
</div>
<ResponsiveTable
remote={true}
data={data}
pageOptions={{
showTotal: true,
......
......@@ -52,6 +52,7 @@ export default function ResponsiveTable(props) {
rowEvents,
rowClasses,
delay,
remote = false,
} = props;
function onColumnMatch({ searchText, value, column, row }) {
......@@ -75,6 +76,17 @@ export default function ResponsiveTable(props) {
}
}
const remoteProps = remote
? {
remote: {
filter: true,
pagination: true,
sort: true,
cellEdit: false,
},
}
: {};
return (
<ToolkitProvider
keyField={keyField || 'id'}
......@@ -113,7 +125,7 @@ export default function ResponsiveTable(props) {
</div>
</div>
<BootstrapTable2
remote
{...remoteProps}
pagination={paginationFactory(pageOptions)}
onTableChange={handleTableChange}
striped
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment