@@ -72,6 +72,7 @@ class Config extends TableView {
7272 let value = data . value ;
7373 let modalValue = value ;
7474 let type = typeof value ;
75+
7576 if ( type === 'object' ) {
7677 if ( isDate ( value ) ) {
7778 type = 'Date' ;
@@ -84,9 +85,9 @@ class Config extends TableView {
8485 type = 'GeoPoint' ;
8586 value = `(${ value . latitude } , ${ value . longitude } )` ;
8687 modalValue = data . value . toJSON ( ) ;
87- } else if ( value instanceof Parse . File ) {
88+ } else if ( data . value instanceof Parse . File ) {
8889 type = 'File' ;
89- value = < a target = '_blank' href = { value . url ( ) } > Open in new window</ a > ;
90+ value = < a target = '_blank' href = { data . value . url ( ) } > Open in new window</ a > ;
9091 } else {
9192 type = 'Object' ;
9293 value = JSON . stringify ( value ) ;
@@ -105,11 +106,19 @@ class Config extends TableView {
105106 modalValue : modalValue
106107 } ) ;
107108 let columnStyle = { width : '30%' , cursor : 'pointer' } ;
109+
110+ let openModalValueColumn = ( ) => {
111+ if ( data . value instanceof Parse . File ) {
112+ return
113+ }
114+ openModal ( )
115+ }
116+
108117 return (
109118 < tr key = { data . param } >
110119 < td style = { columnStyle } onClick = { openModal } > { data . param } </ td >
111120 < td style = { columnStyle } onClick = { openModal } > { type } </ td >
112- < td style = { columnStyle } onClick = { openModal } > { value } </ td >
121+ < td style = { columnStyle } onClick = { openModalValueColumn } > { value } </ td >
113122 < td style = { { textAlign : 'center' } } >
114123 < a onClick = { this . deleteParam . bind ( this , data . param ) } >
115124 < Icon width = { 16 } height = { 16 } name = 'trash-solid' fill = '#ff395e' />
@@ -145,7 +154,15 @@ class Config extends TableView {
145154 if ( params ) {
146155 data = [ ] ;
147156 params . forEach ( ( value , param ) => {
148- data . push ( { param, value } ) ;
157+ let type = typeof value ;
158+ if ( type === 'object' && value . __type == 'File' ) {
159+ value = Parse . File . fromJSON ( value ) ;
160+ }
161+ else if ( type === 'object' && value . __type == 'GeoPoint' ) {
162+ value = new Parse . GeoPoint ( value ) ;
163+ }
164+
165+ data . push ( { param : param , value : value } )
149166 } ) ;
150167 }
151168 }
0 commit comments