File tree Expand file tree Collapse file tree
plugins/field-grid-dropdown Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,11 @@ in Blockly core. The config object bag passed into this field accepts additional
3636
3737``` js
3838import * as Blockly from ' blockly' ;
39- import {FieldGridDropdown } from ' @blockly/field-grid-dropdown' ;
39+ import {
40+ FieldGridDropdown ,
41+ registerFieldGridDropdown ,
42+ } from ' @blockly/field-grid-dropdown' ;
43+ registerFieldGridDropdown ();
4044Blockly .Blocks [' test_field_grid_dropdown' ] = {
4145 init : function () {
4246 this .appendDummyInput ()
@@ -62,7 +66,8 @@ Blockly.Blocks['test_field_grid_dropdown'] = {
6266
6367``` js
6468import * as Blockly from ' blockly' ;
65- import ' @blockly/field-grid-dropdown' ;
69+ import {registerFieldGridDropdown } from ' @blockly/field-grid-dropdown' ;
70+ registerFieldGridDropdown ();
6671Blockly .defineBlocksWithJsonArray ([
6772 {
6873 type: ' test_field_grid_dropdown' ,
Original file line number Diff line number Diff line change @@ -208,7 +208,10 @@ export class FieldGridDropdown extends Blockly.FieldDropdown {
208208 }
209209}
210210
211- Blockly . fieldRegistry . register ( 'field_grid_dropdown' , FieldGridDropdown ) ;
211+ /** Register the field and any dependencies. */
212+ export function registerFieldGridDropdown ( ) {
213+ Blockly . fieldRegistry . register ( 'field_grid_dropdown' , FieldGridDropdown ) ;
214+ }
212215
213216/**
214217 * CSS for grid field.
You can’t perform that action at this time.
0 commit comments