File tree Expand file tree Collapse file tree 4 files changed +8
-10
lines changed
components/ContextAPIManager Expand file tree Collapse file tree 4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ const AssignContainer = () => {
81
81
</ Grid >
82
82
83
83
< Grid item >
84
- < DataTable target = { tableState } />
84
+ < DataTable target = { tableState } contextInput = { contextInput } />
85
85
</ Grid >
86
86
</ Grid >
87
87
</ Grid >
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export default function DataTable({ target }) {
34
34
< Table sx = { { width : '510px' } } aria-label = "customized table" >
35
35
< TableHead >
36
36
< TableRow >
37
- < StyledTableCell > Contexts Consumed</ StyledTableCell >
37
+ < StyledTableCell align = "center" > Contexts Consumed</ StyledTableCell >
38
38
</ TableRow >
39
39
</ TableHead >
40
40
< TableBody >
Original file line number Diff line number Diff line change @@ -36,15 +36,14 @@ const AddContextForm = ({
36
36
values : [ ]
37
37
} ) ;
38
38
renderTable ( newValue ) ;
39
-
40
39
} else {
41
40
setContextInput ( newValue ) ;
42
41
renderTable ( newValue ) ;
43
42
}
44
43
} ;
45
44
46
45
const filterOptions = ( options , params ) => {
47
- // setBtnDisabled(true);
46
+ // setBtnDisabled(true);
48
47
const filtered = filter ( options , params ) ;
49
48
const { inputValue } = params ;
50
49
// Suggest the creation of a new contextInput
@@ -55,7 +54,7 @@ const AddContextForm = ({
55
54
name : `Add "${ inputValue } "`
56
55
} ) ;
57
56
58
- // setBtnDisabled(false);
57
+ // setBtnDisabled(false);
59
58
}
60
59
61
60
return filtered ;
@@ -74,9 +73,7 @@ const AddContextForm = ({
74
73
return option . name ;
75
74
} ;
76
75
77
- const renderOption = ( props , option ) => (
78
- < li { ...props } > { option . name } </ li >
79
- ) ;
76
+ const renderOption = ( props , option ) => < li { ...props } > { option . name } </ li > ;
80
77
81
78
return (
82
79
< Fragment >
Original file line number Diff line number Diff line change @@ -3,22 +3,23 @@ import * as types from '../../constants/actionTypes';
3
3
const initialState = {
4
4
allContext : [
5
5
{
6
- name : 'MainContext1 ' ,
6
+ name : 'ContextExample1 ' ,
7
7
values : [
8
8
{ key : 'testKey1' , value : 'testValue1' } ,
9
9
{ key : 'testKey2' , value : 'testValue2' }
10
10
] ,
11
11
components : [ 'MainContainer' , 'SubmitForm' ]
12
12
} ,
13
13
{
14
- name : 'MainContext3 ' ,
14
+ name : 'ContextExample2 ' ,
15
15
values : [
16
16
{ key : 'testKey3' , value : 'testValue3' } ,
17
17
{ key : 'testKey33' , value : 'testValue33' }
18
18
] ,
19
19
components : [ 'MainContainer' , 'EditForm' , 'TableContainer' ]
20
20
}
21
21
]
22
+ // allContext: []
22
23
} ;
23
24
24
25
const contextReducer = ( state = initialState , action ) => {
You can’t perform that action at this time.
0 commit comments