question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select component for enums

See original GitHub issue

Problem

When creating a <Select>-field for to select values of an enumeration, I manually need to add the possible options again and add an onchange-function to then change the value in an <EditForm>.

Sugested solution

It would be greate to have one <SelectEnum>-field that takes over all the work as it was done here - but of course in ant design!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ElderJamescommented, Nov 24, 2020

@Epictek @ElDiddi I think We can support it in the new select. Enable user only pass the enum type as the generic type.

1reaction
mreinfurtcommented, Jan 11, 2021

@dennisrahmen Sounds good! My use case needs localisation as well. I’ll see what I can do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using enumerations in React select
We can define a generic function getEnumKeys ,that gets the array of keys of an enum: const getEnumKeys = <T>(enumToDeconstruct: T): Array<keyof ...
Read more >
Bind input select element to enum in blazor
In this video we will discuss how to bind input select element to enum type in Blazor. Gender Enum. We want to bind...
Read more >
Enum selection field in component - Programming & Scripting
How can I add selection of a Enum type in my SceneComponent. I've added UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Classes) ...
Read more >
Blazorise Select component
Select and SelectItem are generic components and they support all of the basic value types line int, string, enum, etc. Nullable types are...
Read more >
Advanced typescript for React developers - part 3
We have an array of strings, a switch case that for every tab returns a select component, and a select component for categories...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found