DialogService configuration changed?

Hi, I am trying to use the DialogService in a brand new Aurelia project. I have lots of dialogs, they need cusomt behavior. Instead of setting these on each dialogService.open() call I want to register these changes in main.ts.

The docs show examples using DialogConfigurationClassic and DialogConfigurationStandard, but it looks this these are not longer available from the @aurelia/dialog package. Is there a newer way of doing things?

I’ve resorted to using a CustomDialogService that stuffs the configuration I need into the open() call automatically. These feels a bit hacky though.

Thanks in advance for any advice.

2 Likes

Hi, had the same problem today. Apparently the docs are already reflecting these recent changes that has not been yet released (my guess is, this will be in beta.25 but who knows )

I believe, for beta.24 you should use DialogDefaultConfiguration by default, or customize it like I did:

DialogConfiguration.customize(cb => {}, [
    DialogService,     
    DialogBootstrapRenderer,
    DefaultDialogGlobalSettings,
    DefaultDialogEventManager,    
  ])
1 Like

In beta 24, we indeed was able to change the implementation like mention above. In beta 25, the way we configure the dialog rendering was change, and it should be a lot simpler to use a different renderer

Beta 25 is out, and the DialogConfigurationClassic and DialogConfigurationStandard should now be available. There’s a lag between doc change and the actual release. We will be tweaking our doc so that it’ll be the same with npm version instead of latest commits.

If you still have issues with figuring out the dialog renderer APIs, please help contribute to this issue your findings [Doc] revamp dialog documentation · Issue #2204 · aurelia/aurelia

1 Like