dialog icon indicating copy to clipboard operation
dialog copied to clipboard

Allow customization of confirm and cancel button texts

Open ajsaraujo opened this issue 2 years ago • 3 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

The text on the confirm and cancel buttons in the built-in confirm modal is set as "Cancel" and "Ok".

Expected behavior

I'd like to be able to pass the text I want as an argument to the confirm method. Something like this, for instance.

this.dialog.confirm({ confirmButtonLabel: 'Confirmar', cancelButtonLabel: 'Cancelar' })

Maybe that option is already available, but I couldn't find any mention to it - if that's the case, I think it would be nice to add that information to README.md.

ajsaraujo avatar May 23 '22 17:05 ajsaraujo

You're welcome to submit a PR

NetanelBasal avatar May 24 '22 05:05 NetanelBasal

When someone starts implementing this, could they make the configuration option also accept an observable? This would make it easier to use a translation library like transloco. It has a method returning an observable that emits when the language changes.

Langstra avatar Jun 13 '22 14:06 Langstra

@NetanelBasal guess we can close this one as soon as a new version gets released?

Langstra avatar Jul 20 '22 08:07 Langstra

Close this issue as we remove this feature in v3.

NetanelBasal avatar Nov 24 '22 07:11 NetanelBasal