Our flexible Kanban board for managing tasks with drag drop


Post 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) {
    	...
    }

Post 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'
})

Please also check this https://bryntum.com/products/taskboard/docs/api/Core/widget/MessageDialog

Good Luck :),
Tasnim


Post by lanpeng »

thanks for your reply, tasnim .it works well


Post Reply