Answer the question
In order to leave comments, you need to log in
How to set default value in input and change it?
const [nameValue, setNameValue] = useState("");
<TextField
id="outlined-read-only-input"
label="Display Name"
variant="outlined"
value={nameValue !== '' ? nameValue : name || '' }
onChange={(e) => setNameValue(e.target.value)}
onBlur={() => setName({ variables: { name: nameValue } })}
/>
onBlur
, the data is sent to the server Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question