Skip to content

Commit

Permalink
fix: don't reset radio group values to undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Feb 28, 2022
1 parent a2a7499 commit 5c35ea8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions website/src/components/UserFeedback/index.jsx
Expand Up @@ -99,7 +99,7 @@ export const FeedbackWrapper = ({ seedData, open }) => {

const Step1 = () => {
const hidden = isHidden(1);
const [newValue, setNewValue] = React.useState(undefined);
const [newValue, setNewValue] = React.useState(state.data.score);
return (
<form
className={visuallyHidden(1) ? styles['invisible'] : ''}
Expand Down Expand Up @@ -211,9 +211,13 @@ export const FeedbackWrapper = ({ seedData, open }) => {
What would you like to see improved in the Unleash
documentation?
</label>
<textarea id={textareaId} name="" rows="3" autoFocus>
{state.data.comment}
</textarea>
<textarea
id={textareaId}
name=""
rows="3"
autoFocus
defaultValue={state.data.comment}
></textarea>

<div className={styles['button-container']}>
<button type="submit">Next</button>
Expand Down Expand Up @@ -245,7 +249,7 @@ export const FeedbackWrapper = ({ seedData, open }) => {

const Step3 = () => {
const hidden = isHidden(3);
const [value, setValue] = React.useState();
const [value, setValue] = React.useState(state.data.customerType);

return (
<form
Expand Down

0 comments on commit 5c35ea8

Please sign in to comment.