mirror of https://github.com/buster-so/buster.git
Merge branch 'wells-bus-1965-update-frontend-to-use-password-for-public-access-when-it-is' of https://github.com/buster-so/buster into wells-bus-1965-update-frontend-to-use-password-for-public-access-when-it-is
This commit is contained in:
commit
bfcb30311a
|
@ -48,7 +48,11 @@ export const InputTextArea = React.forwardRef<InputTextAreaRef, InputTextAreaPro
|
|||
) => {
|
||||
const textareaRef = useRef<HTMLTextAreaElement | null>(null);
|
||||
|
||||
useImperativeHandle(ref, () => {
|
||||
<<<<<<< HEAD
|
||||
useImperativeHandle(
|
||||
ref,
|
||||
() =>
|
||||
{
|
||||
if (!textareaRef.current) {
|
||||
return null as unknown as InputTextAreaRef;
|
||||
}
|
||||
|
@ -61,7 +65,28 @@ export const InputTextArea = React.forwardRef<InputTextAreaRef, InputTextAreaPro
|
|||
}
|
||||
},
|
||||
});
|
||||
}, []);
|
||||
}
|
||||
,
|
||||
[]
|
||||
)
|
||||
=======
|
||||
useImperativeHandle(ref, () =>
|
||||
{
|
||||
if (!textareaRef.current) {
|
||||
return null as unknown as InputTextAreaRef;
|
||||
}
|
||||
return Object.assign(textareaRef.current, {
|
||||
forceRecalculateHeight: () => {
|
||||
if (textareaRef.current) {
|
||||
// Force a recalculation by triggering an input event
|
||||
const event = new Event('input', { bubbles: true });
|
||||
textareaRef.current.dispatchEvent(event);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
, [])
|
||||
>>>>>>> staging
|
||||
|
||||
const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
|
||||
if (e.key === 'Enter') {
|
||||
|
|
Loading…
Reference in New Issue