Fix missing key for cssinput
This commit is contained in:
parent
7494383f58
commit
b62aee978b
2 changed files with 14 additions and 13 deletions
|
@ -2,7 +2,7 @@ import * as React from 'react';
|
|||
|
||||
interface ITextInputGroupProps {
|
||||
/** Use key the same way as React.Key */
|
||||
key: string
|
||||
id: string
|
||||
labelKey?: string
|
||||
labelText: string
|
||||
inputKey: string
|
||||
|
@ -24,7 +24,7 @@ export function TextInputGroup(props: ITextInputGroupProps): JSX.Element {
|
|||
|
||||
React.useEffect(() => {
|
||||
setValue(props.value);
|
||||
}, [props.value, props.key]);
|
||||
}, [props.value, props.id]);
|
||||
|
||||
function OnKeyUp(event: React.KeyboardEvent): void {
|
||||
switch (event.key) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue