fix(dashboard): use textContent to render hidden title (#26189)

This commit is contained in:
ʈᵃᵢ 2023-12-07 13:33:49 -08:00 committed by GitHub
parent b4a35e624b
commit 88fb342887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -113,10 +113,7 @@ export const DynamicEditableTitle = ({
// then we can measure the width of that span to resize the input element
useLayoutEffect(() => {
if (sizerRef?.current) {
sizerRef.current.innerHTML = (currentTitle || placeholder).replace(
/\s/g,
' ',
);
sizerRef.current.textContent = currentTitle || placeholder;
}
}, [currentTitle, placeholder, sizerRef]);