Skip to content

Commit b7f82be

Browse files
Sinakaev MarkSinakaev Mark
authored andcommitted
the ToolbarSelect is always shown
1 parent 7d3a190 commit b7f82be

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/MUIDataTable.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ const STP = {
107107
REPLACE: 'replace',
108108
ABOVE: 'above',
109109
NONE: 'none',
110+
ALWAYS: 'always'
110111
};
111112

112113
class MUIDataTable extends React.Component {
@@ -241,7 +242,7 @@ class MUIDataTable extends React.Component {
241242
setRowProps: PropTypes.func,
242243
selectToolbarPlacement: PropTypes.oneOfType([
243244
PropTypes.bool,
244-
PropTypes.oneOf([STP.REPLACE, STP.ABOVE, STP.NONE]),
245+
PropTypes.oneOf([STP.REPLACE, STP.ABOVE, STP.NONE, STP.ALWAYS]),
245246
]),
246247
setTableProps: PropTypes.func,
247248
sort: PropTypes.bool,
@@ -1931,7 +1932,7 @@ class MUIDataTable extends React.Component {
19311932

19321933
return (
19331934
<Paper elevation={this.options.elevation} ref={this.tableContent} className={paperClasses}>
1934-
{selectedRows.data.length > 0 && this.options.selectToolbarPlacement !== STP.NONE && (
1935+
{(this.options.selectToolbarPlacement === STP.ALWAYS || selectedRows.data.length > 0 && this.options.selectToolbarPlacement !== STP.NONE) && (
19351936
<TableToolbarSelectComponent
19361937
options={this.options}
19371938
selectedRows={selectedRows}

0 commit comments

Comments
 (0)