File tree Expand file tree Collapse file tree
Document-Processing/code-snippet/spreadsheet/react/open-from-json-cs1/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,12 +8,7 @@ function App() {
88
99 const handleOpenFromJson = React . useCallback ( ( ) => {
1010 if ( ! spreadsheetRef . current ) return ;
11- try {
1211 spreadsheetRef . current . openFromJson ( { file : jsonData } ) ;
13- } catch ( e ) {
14- console . error ( 'Failed to open from JSON' , e ) ;
15- alert ( 'Failed to open from JSON.' ) ;
16- }
1712 } , [ ] ) ;
1813
1914 return (
Original file line number Diff line number Diff line change @@ -8,12 +8,7 @@ function App(): React.ReactElement {
88
99 const handleOpenFromJson = React . useCallback ( ( ) : void => {
1010 if ( ! spreadsheetRef . current ) return ;
11- try {
1211 spreadsheetRef . current . openFromJson ( { file : jsonData } ) ;
13- } catch ( e ) {
14- console . error ( 'Failed to open from JSON' , e ) ;
15- alert ( 'Failed to open from JSON.' ) ;
16- }
1712 } , [ ] ) ;
1813
1914 return (
You can’t perform that action at this time.
0 commit comments