Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: the last Table column is not calculated when the columns have a … #1564

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/Table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ export default class Table extends Component {
};
const maxRowSelection = this.getMaxRowSelection();
const minColWidth = Number(minColumnWidth) || 50;
const maxColWidth = Number(maxColumnWidth) || 1000;
const maxColWidth = Number(maxColumnWidth) || 5000;
Copy link
Collaborator

@TahimiLeonBravo TahimiLeonBravo May 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use Infinity instead 5000


const isEmpty = data.length === 0;

Expand Down Expand Up @@ -490,7 +490,7 @@ Table.propTypes = {
resizeColumnDisabled: PropTypes.bool,
/** The minimum width for all columns. The default value is 50px. */
minColumnWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/** The maximum width for all columns. The default value is 1000px. */
/** The maximum width for all columns. The default value is 5000px. */
maxColumnWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/** Show or hide the checkbox column for row selection. To show set
* showCheckboxColumn to true. The default value is false. */
Expand Down Expand Up @@ -540,7 +540,7 @@ Table.defaultProps = {
onSort: () => {},
resizeColumnDisabled: false,
minColumnWidth: 50,
maxColumnWidth: 1000,
maxColumnWidth: 5000,
showCheckboxColumn: false,
onRowSelection: () => {},
maxRowSelection: undefined,
Expand Down