Skip to content

Commit e09c39c

Browse files
authored
Merge pull request #1892 from MarkSinD/feature
ToolbarSelect should always shown
2 parents c7a4020 + b7f82be commit e09c39c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/MUIDataTable.js

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

113114
class MUIDataTable extends React.Component {
@@ -242,7 +243,7 @@ class MUIDataTable extends React.Component {
242243
setRowProps: PropTypes.func,
243244
selectToolbarPlacement: PropTypes.oneOfType([
244245
PropTypes.bool,
245-
PropTypes.oneOf([STP.REPLACE, STP.ABOVE, STP.NONE]),
246+
PropTypes.oneOf([STP.REPLACE, STP.ABOVE, STP.NONE, STP.ALWAYS]),
246247
]),
247248
setTableProps: PropTypes.func,
248249
sort: PropTypes.bool,
@@ -1932,7 +1933,7 @@ class MUIDataTable extends React.Component {
19321933

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

0 commit comments

Comments
 (0)