File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
playground/forms/custom-toolbar-radio-button Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ const item = {
88 id : "add-radio-group" ,
99 title : "Add Radio Group" ,
1010 onPress : async ( ) => {
11- if ( ! instance ) return ;
12-
1311 const radioWidget1 = new window . NutrientViewer . Annotations . WidgetAnnotation (
1412 {
1513 id : window . NutrientViewer . generateInstantId ( ) ,
@@ -23,6 +21,7 @@ const item = {
2321 } ) ,
2422 } ,
2523 ) ;
24+
2625 const radioWidget2 = new window . NutrientViewer . Annotations . WidgetAnnotation (
2726 {
2827 id : window . NutrientViewer . generateInstantId ( ) ,
@@ -36,6 +35,7 @@ const item = {
3635 } ) ,
3736 } ,
3837 ) ;
38+
3939 const formField = new window . NutrientViewer . FormFields . RadioButtonFormField (
4040 {
4141 name : "MyFormField" ,
@@ -56,7 +56,8 @@ const item = {
5656 defaultValue : "1" ,
5757 } ,
5858 ) ;
59- await instance . create ( [ radioWidget1 , radioWidget2 , formField ] ) ;
59+
60+ await instance ?. create ( [ radioWidget1 , radioWidget2 , formField ] ) ;
6061 } ,
6162} ;
6263
You can’t perform that action at this time.
0 commit comments