This repository was archived by the owner on Mar 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { Main } from "./components/Main";
6
6
function preventTags ( str ) {
7
7
return str . replace ( / & / g, '&' ) . replace ( / < / g, '<' ) . replace ( / > / g, '>' ) ;
8
8
}
9
+ var showID = true
9
10
class App extends Component {
10
11
constructor ( props ) {
11
12
super ( props ) ;
@@ -86,6 +87,9 @@ class App extends Component {
86
87
onChange = { ( e ) => this . setState ( { nameSearch : e . target . value } ) }
87
88
> </ input >
88
89
</ div >
90
+ < div className = "form-item" >
91
+ < label htmlFor = "showID" > Show Project ID</ label >
92
+ < input type = "checkbox" name = "showID" > </ input >
89
93
</ div >
90
94
91
95
< h3 > Results</ h3 >
@@ -96,7 +100,7 @@ class App extends Component {
96
100
< table class = "table" >
97
101
< thead >
98
102
< tr >
99
- < th > ID </ th >
103
+ < th > { showID ? "ID" : "-" } </ th >
100
104
< th > Name</ th >
101
105
< th > Created</ th >
102
106
< th > Modified</ th >
@@ -120,8 +124,8 @@ class App extends Component {
120
124
121
125
return (
122
126
< tr key = { project . id } >
123
- < td > { project . id } </ td >
124
- < td > { preventTags ( project . title ) } </ td >
127
+ < td > { showID ? project . id : "-" } </ td >
128
+ < td > { project . title } </ td >
125
129
< td >
126
130
{ created . toLocaleDateString ( ) } { " " }
127
131
{ created . toLocaleTimeString ( ) }
You can’t perform that action at this time.
0 commit comments