Custom field does not appear!

18 views
Skip to first unread message

Omid Abdollahi

unread,
Feb 21, 2021, 2:33:43 PM2/21/21
to Blockly
Hi.
I have a custom block with a custom field in it but does not show the field.
It is strange because when I use another custom field (in another file) which is exactly the same, every thing works fine.

here is the block json. 'field_1' works fine but 'field_2' wont appear. 


var test1Block = {
  type: "test1_block",
  message0: "test1 block %1",
  args0: [
    {
      type: "field_2",
      // type: "field_1",
      name: "FIELD",
      text: "Click me!",
    },
  ],
  inputsInline: true,
  output: null,
};

Omid Abdollahi

unread,
Feb 22, 2021, 2:17:40 AM2/22/21
to Blockly
By the way these two identical fields are copy/paste of blockly-react sample

Beka Westberg

unread,
Feb 22, 2021, 4:31:02 PM2/22/21
to blo...@googlegroups.com
Hello,

That is definitely some weird behavior! Here are a few things that you may want to check:
1) Do you see any errors in the console?
2) Are you properly importing both of your fields?
3) Are you properly registering both of your fields?

If none of those things seem off I don't know what's going on :/ If that's the case it would be really helpful if you could file a bug on the blockly samples repo with all of the relevant source code =)

Sorry I can't be more help :/
--Beka

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/ca90aaa4-b626-4ab7-b478-293712937277n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages