File tree Expand file tree Collapse file tree 1 file changed +19
-15
lines changed Expand file tree Collapse file tree 1 file changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -158,22 +158,26 @@ const Table = () => {
158158 id : 'Checkbox' ,
159159 Cell : cellInfo => {
160160 return (
161- < input
162- type = "checkbox"
163- checked = { checked [ cellInfo . row . original . id ] }
164- onChange = { ( ) => {
165- checked [ cellInfo . row . original . id ] = ! checked [
166- cellInfo . row . original . id
167- ] ;
161+ < span data-tip = { `Question #${ Number ( cellInfo . row . id ) + 1 } ` } >
162+ < input
163+ type = "checkbox"
164+ checked = { checked [ cellInfo . row . original . id ] }
165+ onChange = { ( ) => {
166+ checked [ cellInfo . row . original . id ] = ! checked [
167+ cellInfo . row . original . id
168+ ] ;
168169
169- const additive = checked [ cellInfo . row . original . id ] ? 1 : - 1 ;
170- difficultyCount [
171- cellInfo . row . original . difficulty
172- ] += additive ;
173- setDifficultyCount ( difficultyCount ) ;
174- setChecked ( [ ...checked ] ) ;
175- } }
176- />
170+ const additive = checked [ cellInfo . row . original . id ]
171+ ? 1
172+ : - 1 ;
173+ difficultyCount [
174+ cellInfo . row . original . difficulty
175+ ] += additive ;
176+ setDifficultyCount ( difficultyCount ) ;
177+ setChecked ( [ ...checked ] ) ;
178+ } }
179+ />
180+ </ span >
177181 ) ;
178182 } ,
179183 } ,
You can’t perform that action at this time.
0 commit comments