Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Change table row height programatically #5701

Closed
andreash opened this issue Oct 28, 2022 · 1 comment
Closed

Change table row height programatically #5701

andreash opened this issue Oct 28, 2022 · 1 comment

Comments

@andreash
Copy link

The row heights can be changed in the UI with the mouse. I would appreciate if there was an API to change the row heights programmatically as well. It would then be possible to use other form elements (with larger height than a normal text cell) inside the cells.

@adidahiya
Copy link
Contributor

@andreash there are <Table> and <Table2> component instance methods to resize rows based on the content in each cell, try them out with something like this:

const tableRef = React.createRef<Table2>();

React.useLayoutEffect(() => {
  tableRef.current?.resizeRowsByTallestCell();
}, []);

return (
  <Table2 ref={tableRef} {...otherProps} />
);

Docs here: https://blueprintjs.com/docs/#table/api.instance-methods

@palantir palantir locked and limited conversation to collaborators Nov 9, 2022
@adidahiya adidahiya converted this issue into discussion #5742 Nov 9, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants