Commit ab4ecce7 authored by Yoon, Daeki's avatar Yoon, Daeki 😅
Browse files

배열에 키 추가

parent 35d3386f
......@@ -153,6 +153,7 @@ export const Question = ({
name="type"
onChange={handleSelect}
disabled={save}
value={element.type}
className="w-36 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-themeColor w-full mr-3 p-2.5"
>
{Array.from(QUESTION_TYPES.entries()).map(([key, value]) => (
......@@ -160,7 +161,7 @@ export const Question = ({
key={key}
id={element._id}
value={key}
selected={key === element.type}
// selected={key === element.type}
>
{value}
</option>
......
......@@ -129,6 +129,7 @@ export const EditSurvey = () => {
</div>
{questions.map((question) => (
<Question
key={question._id}
element={question}
handleQuestion={handleQuestion}
deleteQuestion={deleteQuestion}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment