Skip to main content

Enum/Optionsfield with Key-Value

I really like the new Enum-Field it’s very helpful and a great workaround to define colors which can be reused in several components.

But I would love to have an option to create a “key=value”.

For example: I would put this in an Enum-Field:

Red=#ff0000
Green=#00ff00
Blue=#0000FF


The user sees the Keys as Labels in the dropdown, but the value is applied to the shape.

2 comments

Log in to comment and vote

Comments2

  • 이민규

    Team•

    Apr 24, 2025

    A feature request has created in dgmjs:

    https://github.com/dgmjs/dgmjs/issues/392

  • Devinside

    •

    Apr 24, 2025

    Little addition:
    if you add the other functionality with global variables, it would be great to add a list from those variables and it would be already set.


    For Example you have these variables:

    colors:
      Red: #ff0000
      Green: #00ff00
      Blue: #0000FF

    Then you have only to apply $colors into the enum field and everything would be set as described.