Skip to content

Commit

Permalink
tweaks for new responsive update
Browse files Browse the repository at this point in the history
  • Loading branch information
patorjk committed Jun 6, 2020
1 parent 1498ba3 commit 4f957e9
Show file tree
Hide file tree
Showing 36 changed files with 89 additions and 79 deletions.
2 changes: 1 addition & 1 deletion examples/array-value-columns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'scrollMaxHeight',
responsive: 'standard',
};

return (
Expand Down
2 changes: 1 addition & 1 deletion examples/column-filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Example extends React.Component {
},
selectableRows: 'multiple',
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
rowsPerPage: 10,
page: 1,
};
Expand Down
2 changes: 1 addition & 1 deletion examples/column-options-update/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Example extends React.Component {
},
selectableRows: 'multiple',
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
rowsPerPage: 10,
page: 1,
};
Expand Down
2 changes: 1 addition & 1 deletion examples/component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'scrollMaxHeight'
responsive: 'standard'
};

return (
Expand Down
2 changes: 1 addition & 1 deletion examples/csv-export/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Example extends React.Component {
filter: true,
selectableRows: 'multiple',
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
rowsPerPage: 10,
downloadOptions: {
filename: 'excel-format.csv',
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-action-columns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
page: 2,
onColumnSortChange: (changedColumn, direction) => console.log('changedColumn: ', changedColumn, 'direction: ', direction),
onChangeRowsPerPage: numberOfRows => console.log('numberOfRows: ', numberOfRows),
Expand Down
2 changes: 1 addition & 1 deletion examples/customize-columns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
};

return (
Expand Down
2 changes: 1 addition & 1 deletion examples/customize-filter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'multiselect',
responsive: 'scrollMaxHeight',
responsive: 'standard',
};

return (
Expand Down
2 changes: 1 addition & 1 deletion examples/customize-footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
rowsPerPage: 10,
customFooter: (count, page, rowsPerPage, changeRowsPerPage, changePage, textLabels) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion examples/customize-rows/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function Example() {
]}
options={{
selectableRows: "none",
responsive: "scrollMaxHeight",
responsive: "standard",
customRowRender: data => {
const [ name, cardNumber, cvc, expiry ] = data;

Expand Down
2 changes: 1 addition & 1 deletion examples/customize-search-render/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Example extends React.Component {
filter: true,
selectableRows: 'mulitple',
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
rowsPerPage: 10,
customSearchRender: (searchText, handleSearch, hideSearch, options) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion examples/customize-search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
page: 0,
searchText: this.state.searchText,
searchProps: {
Expand Down
2 changes: 1 addition & 1 deletion examples/customize-sorting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
customSort: (data, colIndex, order) => {
return data.sort((a, b) => {
return (a.data[colIndex].length < b.data[colIndex].length ? -1: 1 ) * (order === 'desc' ? 1 : -1);
Expand Down
12 changes: 6 additions & 6 deletions examples/customize-styling/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Example extends React.Component {
super(props);
this.state = {
denseTable: false,
stacked: true
vertical: true
};
}

Expand Down Expand Up @@ -54,7 +54,7 @@ class Example extends React.Component {

toggleResponsive = (event) => {
this.setState({
stacked: event.target.checked ? true : false
vertical: event.target.checked ? true : false
});
}

Expand Down Expand Up @@ -149,7 +149,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: this.state.stacked ? 'stacked' : 'scrollMaxHeight',
responsive: this.state.vertical ? 'vertical' : 'standard',
fixedHeader: false,
fixedSelectColumn: false,
rowHover: false,
Expand Down Expand Up @@ -191,13 +191,13 @@ class Example extends React.Component {
<FormControlLabel
control={
<Switch
checked={this.state.stacked}
checked={this.state.vertical}
onChange={this.toggleResponsive}
value="stacked"
value="vertical"
color="primary"
/>
}
label="Stacked Table"
label="Responsive Vertical Table"
/>
</FormGroup>
<MUIDataTable title={"ACME Employee list"} data={data} columns={columns} options={options} />
Expand Down
2 changes: 1 addition & 1 deletion examples/customize-toolbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Example extends React.Component {
filter: true,
selectableRows: 'multiple',
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
rowsPerPage: 10,
customToolbar: () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion examples/customize-toolbarselect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Example extends React.Component {
filter: true,
selectableRows: 'multiple',
filterType: "dropdown",
responsive: "stacked",
responsive: "vertical",
rowsPerPage: 10,
customToolbarSelect: (selectedRows, displayData, setSelectedRows) => (
<CustomToolbarSelect selectedRows={selectedRows} displayData={displayData} setSelectedRows={setSelectedRows} />
Expand Down
2 changes: 1 addition & 1 deletion examples/data-as-objects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
enableNestedDataAccess: '.', // allows nested data separated by "." (see column names and the data structure above)
};

Expand Down
4 changes: 2 additions & 2 deletions examples/expandable-rows/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React from "react";
import ReactDOM from "react-dom";
import MUIDataTable from "../../src/";
import TableRow from "@material-ui/core/TableRow";
Expand Down Expand Up @@ -80,7 +80,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'scrollMaxHeight',
responsive: 'standard',
expandableRows: true,
expandableRowsHeader: true,
expandableRowsOnClick: true,
Expand Down
2 changes: 1 addition & 1 deletion examples/fixed-header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'scrollMaxHeight',
responsive: 'standard',
fixedHeader: true,
fixedSelectColumn: true
};
Expand Down
2 changes: 1 addition & 1 deletion examples/hide-columns-print/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'scrollMaxHeight',
responsive: 'standard',
};

return (
Expand Down
2 changes: 1 addition & 1 deletion examples/large-data-set/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Example extends React.Component {
rowsPerPageOptions: [10, 100, 250, 500, 1000],
filter: true,
filterType: 'dropdown',
responsive: 'scrollMaxHeight',
responsive: 'standard',
customSearchRender: debounceSearchRender(500),
};

Expand Down
2 changes: 1 addition & 1 deletion examples/on-download/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'scrollMaxHeight',
responsive: 'standard',
onDownload: (buildHead, buildBody, columns, data) =>
buildHead(headerNames) +
buildBody(
Expand Down
2 changes: 1 addition & 1 deletion examples/on-table-init/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Example extends React.Component {
filter: true,
selectableRows: 'multiple',
filterType: 'dropdown',
responsive: 'scrollMaxHeight',
responsive: 'standard',
rowsPerPage: 10,
download: false, // hide csv download option
onTableInit: this.handleTableInit,
Expand Down
2 changes: 1 addition & 1 deletion examples/selectable-rows/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Example extends React.Component {
selectableRowsOnClick: true,
selectableRowsHideCheckboxes: this.state.selectableRowsHideCheckboxes,
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
rowsPerPage: 10,
rowsSelected: this.state.rowsSelected,
onRowsSelect: (rowsSelected, allRows) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/serverside-filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class Example extends React.Component {
filter: true,
serverSideFilterList: this.state.serverSideFilterList,
filterType: 'dropdown',
responsive: 'scrollMaxHeight',
responsive: 'standard',
serverSide: true,
onFilterDialogOpen: () => {
console.log('filter dialog opened');
Expand Down
2 changes: 1 addition & 1 deletion examples/serverside-options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Example extends React.Component {
filter: true,
selectableRows: 'multiple',
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
rowsPerPage: 10,
page: 1,
rowsSelected: [2, 5],
Expand Down
2 changes: 1 addition & 1 deletion examples/serverside-pagination/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
serverSide: true,
count: count,
page: page,
Expand Down
2 changes: 1 addition & 1 deletion examples/serverside-sorting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'scrollMaxHeight',
responsive: 'standard',
serverSide: true,
count: count,
page: page,
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-no-toolbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Example extends React.Component {
download: false,
viewColumns: false,
customToolbar: null,
responsive: 'stacked'
responsive: 'vertical'
};

return (
Expand Down
2 changes: 1 addition & 1 deletion examples/text-localization/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Example extends React.Component {
const options = {
filter: true,
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
textLabels: {
body: {
noMatch: "Sorry we could not find any records!",
Expand Down
2 changes: 1 addition & 1 deletion examples/themes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Example extends React.Component {
filter: true,
selectableRows: 'multiple',
filterType: 'dropdown',
responsive: 'stacked',
responsive: 'vertical',
rowsPerPage: 10,
page: 1,
};
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4f957e9

Please sign in to comment.