How to customize the button text of MessageDialog?
Posted: Wed Nov 23, 2022 9:49 am
by lanpeng
Hi bryntum team
How to customize the button text of MessageDialog?The default text are 'OK' and 'CANCEL' . I want to set it to 'YES' and 'NO' .
const result = await MessageDialog.prompt({
title: `Are you sure you want to cancel ${this.originalData.title}`,
message: 'Enter your cancel reson'
});
if (result.button === MessageDialog.okButton) {
...
}
Re: How to customize the button text of MessageDialog?
Posted: Wed Nov 23, 2022 11:38 am
by tasnim
Hello,
It's really simple to achieve.
You just need to set okButton : 'YES' and cancelButton : 'NO'
Here is an example
MessageDialog.prompt({
title: `Are you sure you want to cancel ${this.originalData.title}`,
message: 'Enter your cancel reson',
okButton : 'YES',
cancelButton : 'NO'
})