Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
survey
Commits
ab4ecce7
Commit
ab4ecce7
authored
Jul 23, 2022
by
Yoon, Daeki
😅
Browse files
배열에 키 추가
parent
35d3386f
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/src/questions/Question.tsx
View file @
ab4ecce7
...
...
@@ -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
>
...
...
frontend/src/survey/EditSurvey.tsx
View file @
ab4ecce7
...
...
@@ -129,6 +129,7 @@ export const EditSurvey = () => {
</
div
>
{
questions
.
map
((
question
)
=>
(
<
Question
key
=
{
question
.
_id
}
element
=
{
question
}
handleQuestion
=
{
handleQuestion
}
deleteQuestion
=
{
deleteQuestion
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment