Skip to content

Not providing a styleClass in custom button causes issues with Material's Dialog #233

@Oxyrus

Description

@Oxyrus

Greetings, not sure if this could be handled in the code or maybe it could be added in the README section for the custom buttons.

I was working in the migration of our Angular application, and now that we are on v19, I noticed some issues in the pages where we are using ngx-wig. Specifically Angular Material's dialog boxes would be blank.

I traced it down to a custom button we had defined:

import { NgxWigComponent } from 'ngx-wig';

export const CLEAR_BUTTON = {
  clear: {
    label: 'Clear text',
    title: 'Clear text',
    command: (ctx: NgxWigComponent) => {
      // Some custom logic...
    },
    icon: 'clear'
  }
};

Notice it lacks a styleClass property.

If then we opened a dialog using Angular Material, i.e.

onClick(): void {
  this.dialog.open(DialogExampleComponent);
}

We would get a blank modal:

Image

It appears the styleClass is mandatory now and some time back it wasn't. Not sure if it would be helpful to highlight this in the README (or maybe update the type used for custom buttons?).

Tested on Angular 19.2 and ngx-wig 19.0.7

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions