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

[table] Remove min width from editable components #285

Merged
merged 1 commit into from
Dec 1, 2016

Conversation

themadcreator
Copy link
Contributor

Fixes #281

Changes proposed in this pull request:

<EditableText> has a default min-width of 80px,
which overflows the table cell.

Settings the minWidth prop to null will fix this.

`<EditableText>` has a default min-width of 80px,
which overflows the table cell.

Settings the minWidth prop to null will fix this.
@blueprint-bot
Copy link

[table] Remove min width from editable components

Preview: docs | table
Coverage: core | datetime

@@ -57,6 +57,7 @@ export class EditableCell extends React.Component<IEditableCellProps, {}> {
className={"bp-table-editable-name"}
defaultValue={value}
intent={intent}
minWidth={null}
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we limit it to something, like 5px maybe? also, minor: it always feels weird to pass null as a prop.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The min/max is set by the table's minColumnWidth/maxColumnWidth and is handled elsewhere. We don't want them to compete. I don't know how to unset a default other than passing null

Copy link
Contributor

Choose a reason for hiding this comment

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

gotcha, that makes sense; could be worth a code comment describing how these two things affect each other at a distance

@themadcreator themadcreator merged commit 74f9c20 into master Dec 1, 2016
@themadcreator themadcreator deleted the bd/fix-editable-cell-width branch December 1, 2016 18:40
@llorca llorca mentioned this pull request Dec 2, 2016
greglo pushed a commit to greglo/blueprint that referenced this pull request Dec 12, 2016
`<EditableText>` has a default min-width of 80px,
which overflows the table cell.

Settings the minWidth prop to null will fix this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants