Skip to content

Angular Material: OneOf Enum Control Renderer#2551

Open
daniel-shuy wants to merge 5 commits intoeclipsesource:masterfrom
daniel-shuy:angular-material/oneof-enum-control-renderer
Open

Angular Material: OneOf Enum Control Renderer#2551
daniel-shuy wants to merge 5 commits intoeclipsesource:masterfrom
daniel-shuy:angular-material/oneof-enum-control-renderer

Conversation

@daniel-shuy
Copy link
Copy Markdown
Contributor

@daniel-shuy daniel-shuy commented Mar 2, 2026

Renamed AutocompleteControlRenderer to EnumControlRenderer to be consistent with other renderer sets

  • For backwards compatibility, I've retained the old component selector and exported the component with the old class name as an alias

The OneOfEnumControlRenderer has the same implementation as the EnumControlRenderer, the only difference being that it takes in EnumOption[] instead of string[], so that a different label can be displayed instead of the value:

export interface EnumOption {
label: string;
value: any;
}

  • oneOf.const is mapped to EnumOption.value
  • oneOf.title is mapped to EnumOption.label

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants