Replace onHeightChanged with ResizeObserver (#29602)

* Replace onHeightChanged with ResizeObserver

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-03-28 10:36:10 +00:00
committed by GitHub
parent 6ae11dab52
commit 209ab59978
31 changed files with 24 additions and 132 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ import CodeBlock from "../components/views/messages/CodeBlock.tsx";
* Replaces `pre` elements with a CodeBlock component
*/
export const codeBlockRenderer: RendererMap = {
pre: (pre, { onHeightChanged }) => {
return <CodeBlock onHeightChanged={onHeightChanged} preNode={pre} />;
pre: (pre) => {
return <CodeBlock preNode={pre} />;
},
};
-1
View File
@@ -88,7 +88,6 @@ export function replacerToRenderFunction(replacer: Replacer): Opts["render"] {
interface Parameters {
isHtml: boolean;
onHeightChanged?: () => void;
// Required for keywordPillRenderer
keywordRegexpPattern?: RegExp;
// Required for mentionPillRenderer