//% shim=ENUM_GET : Enums members coded in JavaScript view are not displayed as selected in block view

Creating enumerations with blocks

Playground example : Create Enums from Blocks

Sample: Creating Enum
Editor: micro:bit

On Blocks editor

Place the blocks as follows:


Member Red (=0) is not selected, but the display will be 0

JavaScript editor → Blocks editor

On the JavaScript editor, code as follows:

When I convert to Blocks, it shows Red instead of Blue and nothing is selected.

However, since 1 is displayed on the simulator, it appears that Blue (=1) is selected internally.
It appears that internal values are retained when blocks are copied.

It seems to be a display issue on the block.

pull request