diff --git a/types/react-bootstrap-table-next/react-bootstrap-table-next-tests.tsx b/types/react-bootstrap-table-next/react-bootstrap-table-next-tests.tsx index 6b61284837..48d9835b3a 100644 --- a/types/react-bootstrap-table-next/react-bootstrap-table-next-tests.tsx +++ b/types/react-bootstrap-table-next/react-bootstrap-table-next-tests.tsx @@ -6,6 +6,7 @@ import BootstrapTable, { HeaderFormatter, ColumnDescription, RowSelectionType, + ROW_SELECT_SINGLE, } from 'react-bootstrap-table-next'; interface Product { @@ -48,8 +49,8 @@ const priceFormatter: ColumnFormatter = (cell, }; const productColumns: Array> = [ - { dataField: 'id', align: CellAlignment.center, sort: true, text: 'Product ID' }, - { dataField: 'name', align: CellAlignment.center, sort: true, text: 'Product Name' }, + { dataField: 'id', align: 'center', sort: true, text: 'Product ID' }, + { dataField: 'name', align: 'center', sort: true, text: 'Product Name' }, { isDummyField: true, dataField: '', @@ -94,8 +95,8 @@ render( hover={true} keyField="id" columns={[ - { dataField: 'id', align: CellAlignment.center, sort: true, text: 'Product ID' }, - { dataField: 'name', align: CellAlignment.center, sort: true, text: 'Product Name' }, + { dataField: 'id', align: 'center', sort: true, text: 'Product ID' }, + { dataField: 'name', align: 'center', sort: true, text: 'Product Name' }, { isDummyField: true, dataField: '', @@ -115,6 +116,7 @@ render( */ { isDummyField: true, + dataField: '', sort: true, formatter: priceFormatter, text: 'Product Price', @@ -152,7 +154,7 @@ render( keyField="id" columns={productColumns} selectRow={{ - mode: RowSelectionType.ROW_SELECT_SINGLE, + mode: ROW_SELECT_SINGLE, }} />, document.getElementById('app'), diff --git a/types/react-bootstrap-table2-filter/react-bootstrap-table2-filter-tests.tsx b/types/react-bootstrap-table2-filter/react-bootstrap-table2-filter-tests.tsx index a502fda254..7081ffeac2 100644 --- a/types/react-bootstrap-table2-filter/react-bootstrap-table2-filter-tests.tsx +++ b/types/react-bootstrap-table2-filter/react-bootstrap-table2-filter-tests.tsx @@ -59,8 +59,8 @@ const priceFormatter: ColumnFormatter = (cell, let priceFilter: any; const productColumns: Array> = [ - { dataField: 'id', align: CellAlignment.center, sort: true, text: 'Product ID' }, - { dataField: 'name', align: CellAlignment.center, sort: true, text: 'Product Name' }, + { dataField: 'id', align: 'center', sort: true, text: 'Product ID' }, + { dataField: 'name', align: 'center', sort: true, text: 'Product Name' }, { isDummyField: true, dataField: '', @@ -94,11 +94,9 @@ const productColumns: Array> = [ onFilter: filterValue => {}, }), }, - /** - * test optional dataField for dummyFields - */ { isDummyField: true, + dataField: '', sort: true, formatter: priceFormatter, text: 'Product Price', @@ -146,8 +144,8 @@ render( keyField="id" data={products} columns={[ - { dataField: 'id', align: CellAlignment.center, sort: true, text: 'Product ID' }, - { dataField: 'name', align: CellAlignment.center, sort: true, text: 'Product Name' }, + { dataField: 'id', align: 'center', sort: true, text: 'Product ID' }, + { dataField: 'name', align: 'center', sort: true, text: 'Product Name' }, { dataField: 'quality', text: 'Product Quailty', @@ -176,11 +174,11 @@ render( keyField="id" data={products} columns={[ - { dataField: 'id', align: CellAlignment.center, sort: true, text: 'Product ID' }, + { dataField: 'id', align: 'center', sort: true, text: 'Product ID' }, { dataField: 'name', formatter: cell => cell, - align: CellAlignment.center, + align: 'center', sort: true, text: 'Product Name', }, diff --git a/types/react-bootstrap-table2-paginator/react-bootstrap-table2-paginator-tests.tsx b/types/react-bootstrap-table2-paginator/react-bootstrap-table2-paginator-tests.tsx index ecee69a052..1c155625ec 100644 --- a/types/react-bootstrap-table2-paginator/react-bootstrap-table2-paginator-tests.tsx +++ b/types/react-bootstrap-table2-paginator/react-bootstrap-table2-paginator-tests.tsx @@ -49,8 +49,8 @@ const priceFormatter: ColumnFormatter = (cell, }; const productColumns: Array> = [ - { dataField: 'id', align: CellAlignment.center, sort: true, text: 'Product ID' }, - { dataField: 'name', align: CellAlignment.center, sort: true, text: 'Product Name' }, + { dataField: 'id', align: 'center', sort: true, text: 'Product ID' }, + { dataField: 'name', align: 'center', sort: true, text: 'Product Name' }, { isDummyField: true, dataField: '', @@ -69,6 +69,7 @@ const productColumns: Array> = [ */ { isDummyField: true, + dataField: '', sort: true, formatter: priceFormatter, text: 'Product Price', diff --git a/types/react-bootstrap-table2-toolkit/react-bootstrap-table2-toolkit-tests.tsx b/types/react-bootstrap-table2-toolkit/react-bootstrap-table2-toolkit-tests.tsx index eea4efca9b..9812c33e7e 100644 --- a/types/react-bootstrap-table2-toolkit/react-bootstrap-table2-toolkit-tests.tsx +++ b/types/react-bootstrap-table2-toolkit/react-bootstrap-table2-toolkit-tests.tsx @@ -50,8 +50,8 @@ const priceFormatter: ColumnFormatter = (cell, }; const productColumns: Array> = [ - { dataField: 'id', align: CellAlignment.center, sort: true, text: 'Product ID' }, - { dataField: 'name', align: CellAlignment.center, sort: true, text: 'Product Name' }, + { dataField: 'id', align: 'center', sort: true, text: 'Product ID' }, + { dataField: 'name', align: 'center', sort: true, text: 'Product Name' }, { isDummyField: true, dataField: '', @@ -70,6 +70,7 @@ const productColumns: Array> = [ */ { isDummyField: true, + dataField: '', sort: true, formatter: priceFormatter, text: 'Product Price',