Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
react-list
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lirong xu
react-list
Commits
5ff3aa63
Commit
5ff3aa63
authored
2 years ago
by
JYCHOI
Browse files
Options
Downloads
Patches
Plain Diff
modify state selection using array.map()
parent
9fb7403e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
public/app.bundle.js
+1
-1
1 addition, 1 deletion
public/app.bundle.js
src/App.js
+4
-8
4 additions, 8 deletions
src/App.js
with
5 additions
and
9 deletions
public/app.bundle.js
+
1
−
1
View file @
5ff3aa63
Source diff could not be displayed: it is too large. Options to address this:
view the blob
.
This diff is collapsed.
Click to expand it.
src/App.js
+
4
−
8
View file @
5ff3aa63
...
...
@@ -6,6 +6,8 @@ const App = (props) => {
let
[
showProduct
,
setShowProduct
]
=
useState
(
true
);
let
[
order
,
setOrder
]
=
useState
({
firstName
:
''
,
lastName
:
''
,
state
:
'
CA
'
,
address
:
''
});
let
states
=
[
'
AL
'
,
'
AR
'
,
'
CA
'
,
'
NV
'
,
'
NY
'
,
'
FL
'
];
let
product
=
{
id
:
1001
,
title
:
"
고양이 사료, 25파운드
"
,
...
...
@@ -109,23 +111,17 @@ const App = (props) => {
<
/div
>
<
div
className
=
"
form-group
"
>
<
div
className
=
"
col-md-2
"
>
<
strong
>
주
:
<
/strong
>
<
div
className
=
"
col-md-
1
2
"
>
<
strong
>
주
:
<
/strong
>
<
select
className
=
"
form-control
"
name
=
"
state
"
value
=
{
order
.
state
}
onChange
=
{
updateOrder
}
>
<
option
disabled
value
=
""
>
주
<
/option
>
<
option
>
AL
<
/option
>
<
option
>
AR
<
/option
>
<
option
>
CA
<
/option
>
<
option
>
NV
<
/option
>
{
states
.
map
((
st
)
=>
<
option
value
=
{
st
}
>
{
st
}
<
/option>
)
}
<
/select
>
<
/div
>
<
/div
>
<
div
className
=
"
form-group
"
>
<
div
className
=
"
col-md-6 boxes
"
>
{
/* <div className="col-md-12"> */
}
<
input
type
=
"
checkbox
"
name
=
"
gift
"
id
=
"
gift
"
value
=
{
true
}
onChange
=
{
updateOrder
}
/
>
<
label
htmlFor
=
"
gift
"
>
선물로
보내기
?
<
/label
>
{
/* </div> */
}
<
/div
>
<
/div
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment