Skip to content

Change table row height programatically #5742

Answered by adidahiya
andreash asked this question in Q&A
Discussion options

You must be logged in to vote

@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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by adidahiya
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #5701 on November 09, 2022 20:14.