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 = () => {
8181 </ Grid >
8282
8383 < Grid item >
84- < DataTable target = { tableState } />
84+ < DataTable target = { tableState } contextInput = { contextInput } />
8585 </ Grid >
8686 </ Grid >
8787 </ Grid >
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export default function DataTable({ target }) {
3434 < Table sx = { { width : '510px' } } aria-label = "customized table" >
3535 < TableHead >
3636 < TableRow >
37- < StyledTableCell > Contexts Consumed</ StyledTableCell >
37+ < StyledTableCell align = "center" > Contexts Consumed</ StyledTableCell >
3838 </ TableRow >
3939 </ TableHead >
4040 < TableBody >
Original file line number Diff line number Diff line change @@ -36,15 +36,14 @@ const AddContextForm = ({
3636 values : [ ]
3737 } ) ;
3838 renderTable ( newValue ) ;
39-
4039 } else {
4140 setContextInput ( newValue ) ;
4241 renderTable ( newValue ) ;
4342 }
4443 } ;
4544
4645 const filterOptions = ( options , params ) => {
47- // setBtnDisabled(true);
46+ // setBtnDisabled(true);
4847 const filtered = filter ( options , params ) ;
4948 const { inputValue } = params ;
5049 // Suggest the creation of a new contextInput
@@ -55,7 +54,7 @@ const AddContextForm = ({
5554 name : `Add "${ inputValue } "`
5655 } ) ;
5756
58- // setBtnDisabled(false);
57+ // setBtnDisabled(false);
5958 }
6059
6160 return filtered ;
@@ -74,9 +73,7 @@ const AddContextForm = ({
7473 return option . name ;
7574 } ;
7675
77- const renderOption = ( props , option ) => (
78- < li { ...props } > { option . name } </ li >
79- ) ;
76+ const renderOption = ( props , option ) => < li { ...props } > { option . name } </ li > ;
8077
8178 return (
8279 < Fragment >
Original file line number Diff line number Diff line change @@ -3,22 +3,23 @@ import * as types from '../../constants/actionTypes';
33const initialState = {
44 allContext : [
55 {
6- name : 'MainContext1 ' ,
6+ name : 'ContextExample1 ' ,
77 values : [
88 { key : 'testKey1' , value : 'testValue1' } ,
99 { key : 'testKey2' , value : 'testValue2' }
1010 ] ,
1111 components : [ 'MainContainer' , 'SubmitForm' ]
1212 } ,
1313 {
14- name : 'MainContext3 ' ,
14+ name : 'ContextExample2 ' ,
1515 values : [
1616 { key : 'testKey3' , value : 'testValue3' } ,
1717 { key : 'testKey33' , value : 'testValue33' }
1818 ] ,
1919 components : [ 'MainContainer' , 'EditForm' , 'TableContainer' ]
2020 }
2121 ]
22+ // allContext: []
2223} ;
2324
2425const contextReducer = ( state = initialState , action ) => {
You can’t perform that action at this time.
0 commit comments