1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-14 00:19:16 +01:00

fix: don't reset radio group values to undefined

This commit is contained in:
Thomas Heartman 2022-02-28 22:14:53 +01:00
parent a2a7499e95
commit 5c35ea84b7

View File

@ -99,7 +99,7 @@ export const FeedbackWrapper = ({ seedData, open }) => {
const Step1 = () => { const Step1 = () => {
const hidden = isHidden(1); const hidden = isHidden(1);
const [newValue, setNewValue] = React.useState(undefined); const [newValue, setNewValue] = React.useState(state.data.score);
return ( return (
<form <form
className={visuallyHidden(1) ? styles['invisible'] : ''} className={visuallyHidden(1) ? styles['invisible'] : ''}
@ -211,9 +211,13 @@ export const FeedbackWrapper = ({ seedData, open }) => {
What would you like to see improved in the Unleash What would you like to see improved in the Unleash
documentation? documentation?
</label> </label>
<textarea id={textareaId} name="" rows="3" autoFocus> <textarea
{state.data.comment} id={textareaId}
</textarea> name=""
rows="3"
autoFocus
defaultValue={state.data.comment}
></textarea>
<div className={styles['button-container']}> <div className={styles['button-container']}>
<button type="submit">Next</button> <button type="submit">Next</button>
@ -245,7 +249,7 @@ export const FeedbackWrapper = ({ seedData, open }) => {
const Step3 = () => { const Step3 = () => {
const hidden = isHidden(3); const hidden = isHidden(3);
const [value, setValue] = React.useState(); const [value, setValue] = React.useState(state.data.customerType);
return ( return (
<form <form