Fix render loop in <Modal>, clean up ref merger code

This commit is contained in:
Evan Hahn 2021-10-01 18:53:00 -05:00 committed by GitHub
parent 1366d09f11
commit 893a77a3ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 36 additions and 39 deletions

View file

@ -15,7 +15,7 @@ import classNames from 'classnames';
import * as grapheme from '../util/grapheme';
import { LocalizerType } from '../types/Util';
import { getClassNamesFor } from '../util/getClassNamesFor';
import { multiRef } from '../util/multiRef';
import { refMerger } from '../util/refMerger';
export type PropsType = {
countLength?: (value: string) => number;
@ -173,7 +173,7 @@ export const Input = forwardRef<
onKeyDown: handleKeyDown,
onPaste: handlePaste,
placeholder,
ref: multiRef<HTMLInputElement | HTMLTextAreaElement | null>(
ref: refMerger<HTMLInputElement | HTMLTextAreaElement | null>(
ref,
innerRef
),