Attempt to fix <ConversationHero>
re-rendering
This commit is contained in:
parent
7a8363c7c8
commit
f3ba979246
1 changed files with 4 additions and 1 deletions
|
@ -140,6 +140,9 @@ export const ConversationHero = ({
|
|||
// this will cause a re-render loop.
|
||||
const previousHeight = previousHeightRef.current;
|
||||
if (previousHeight && height && previousHeight !== height) {
|
||||
window.log.info(
|
||||
`ConversationHero height changed from ${previousHeight} to ${height}`
|
||||
);
|
||||
onHeightChange?.();
|
||||
}
|
||||
}, [height, onHeightChange]);
|
||||
|
@ -176,7 +179,7 @@ export const ConversationHero = ({
|
|||
bounds
|
||||
onResize={({ bounds }) => {
|
||||
assert(bounds, 'We should be measuring the bounds');
|
||||
setHeight(bounds.height);
|
||||
setHeight(Math.ceil(bounds.height));
|
||||
}}
|
||||
>
|
||||
{({ measureRef }) => (
|
||||
|
|
Loading…
Add table
Reference in a new issue