proper last connection autofill

This commit is contained in:
SpikeHD
2022-05-29 18:25:26 -07:00
parent c15e82b30a
commit 7cfd41f9b0
2 changed files with 14 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import Close from '../../../resources/icons/close.svg'
interface IProps {
value?: string;
initalValue?: string;
placeholder?: string;
onChange?: (value: string) => void;
readOnly?: boolean;
@@ -38,6 +39,14 @@ export default class TextInput extends React.Component<IProps, IState> {
return { value: props.value || '' }
}
async componentDidMount() {
if (this.props.initalValue) {
this.setState({
value: this.props.initalValue
})
}
}
render() {
return (
<div className="TextInputWrapper" style={this.props.style || {}}>