Skip to content

Angular Material: OneOf Enum Control Renderer#2551

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

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

Conversation

@daniel-shuy
Copy link
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

@netlify
Copy link

netlify bot commented Mar 2, 2026

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit bf1d6ed
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/69b26b8b0664be00083bc100
😎 Deploy Preview https://deploy-preview-2551--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! ❤️

@daniel-shuy daniel-shuy force-pushed the angular-material/oneof-enum-control-renderer branch from 3f7d65d to e94da20 Compare March 10, 2026 04:13
@daniel-shuy daniel-shuy requested a review from sdirix March 10, 2026 04:19
@daniel-shuy daniel-shuy force-pushed the angular-material/oneof-enum-control-renderer branch from e94da20 to fc55e41 Compare March 12, 2026 03:57
@daniel-shuy
Copy link
Contributor Author

daniel-shuy commented Mar 12, 2026

The modification of the .eslintrc.js (to lint Angular templates in .html files) has caused previously unresolved ESLint violations to resurface, causing the build to fail. I've resolved them in this PR.

@daniel-shuy daniel-shuy force-pushed the angular-material/oneof-enum-control-renderer branch from fc55e41 to bf1d6ed Compare March 12, 2026 07:30
@coveralls
Copy link

Coverage Status

coverage: 82.853% (+0.001%) from 82.852%
when pulling bf1d6ed on daniel-shuy:angular-material/oneof-enum-control-renderer
into fd7979a on eclipsesource:master.

Comment on lines +59 to +60
templateUrl: './enum.renderer.html',
styleUrls: ['./enum.renderer.scss'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every other renderer in this package uses inline template: and styles:. I'd prefer a shared const for the template and styles strings that both @Component decorators reference, which is what I originally suggested. That keeps the convention consistent and removes the need for the .eslintrc.js restructuring.

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