@@ -15,7 +15,6 @@ export default function SchemaGraphDialog (props: Props) {
15
15
const theme = useTheme ( ) ;
16
16
const styles = useStyles ( ) ;
17
17
const [ selectedSources , setSelectedSources ] = useState < string [ ] > ( [ ] ) ;
18
- const [ hideObservations , setHideObservations ] = useState ( true ) ;
19
18
20
19
const handleSourceClick = ( source : string ) => {
21
20
if ( selectedSources . indexOf ( source ) === - 1 ) {
@@ -37,16 +36,13 @@ export default function SchemaGraphDialog (props: Props) {
37
36
< div className = { styles . schemaGraphExplorer } >
38
37
< SchemaGraphExplorer
39
38
backgroundColor = { theme . palette . background . default }
40
- sources = { selectedSources }
41
- hideObservations = { hideObservations } />
39
+ sources = { selectedSources } />
42
40
</ div >
43
41
< div className = { styles . leftControl } >
44
42
< div className = { styles . leftControlChild } >
45
43
< SourcesList
46
44
sources = { props . sources . sort ( ) }
47
45
selected = { selectedSources }
48
- showObservation = { ! hideObservations }
49
- onShowObservationsClick = { ( ) => setHideObservations ( ! hideObservations ) }
50
46
className = { styles . sourcesList }
51
47
onSourceClick = { handleSourceClick } />
52
48
</ div >
@@ -119,23 +115,17 @@ const useStyles = makeStyles(theme => ({
119
115
interface SourcesListProps {
120
116
sources : string [ ] ;
121
117
selected : string [ ] ;
122
- showObservation : boolean ;
123
118
124
119
className ?: string ;
125
120
126
121
onSourceClick : ( source : string ) => void ;
127
- onShowObservationsClick : ( ) => void ;
128
122
}
129
123
130
124
function SourcesList ( props : SourcesListProps ) {
131
125
const handleToggle = ( source : string ) => {
132
126
return ( ) => props . onSourceClick ( source ) ;
133
127
}
134
128
135
- const handleShowObservationsToggle = ( ) => {
136
- props . onShowObservationsClick ( ) ;
137
- }
138
-
139
129
const items = props . sources . map ( ( s , i ) => {
140
130
return (
141
131
< ListItem key = { `item-${ i } ` } dense = { true } onClick = { handleToggle ( s ) } >
@@ -156,20 +146,6 @@ function SourcesList(props: SourcesListProps) {
156
146
157
147
return (
158
148
< List className = { props . className } >
159
- < ListItem dense = { true } onClick = { handleShowObservationsToggle } >
160
- < ListItemIcon >
161
- < Switch
162
- size = "small"
163
- color = "default"
164
- edge = "start"
165
- checked = { props . showObservation }
166
- tabIndex = { - 1 }
167
- disableRipple
168
- inputProps = { { 'aria-labelledby' : `show-source-observations-item` } }
169
- />
170
- </ ListItemIcon >
171
- < ListItemText id = { `show-source-observations-item` } primary = { "Show observations" } />
172
- </ ListItem >
173
149
{ items }
174
150
</ List >
175
151
)
0 commit comments