Our blazing fast Grid component built with pure JavaScript


Post by ankamomkar »

let bryntumGantt: any;
try {
  bryntumGantt = require('@bryntum/gantt');
} catch {
  console.warn('@bryntum/gantt is not available.');
}
const { MessageDialog } = bryntumGantt;

const poolRowDeleteOnClick =
  (messageDialog: any, AjaxHelper: any) =>
  async ({ record }: { record: any }) => {
    const poolsDeleteUrl = '/Resource/Pools/DeletePool?poolId=';
    if (record.poolId > 0) {
      const result = MessageDialog.confirm({
        title: messageDialog.current.title,
        message: messageDialog.current.message,
        okButton: messageDialog.current.okButton,
        cancelButton: messageDialog.current.cancelButton,
      });
      if (result === MessageDialog.okButton) {
        AjaxHelper.post(poolsDeleteUrl + record.poolId);
        record.remove();
      }
    }
  };

my code is this I want to use the Mui button component for the okButton


Post by tasnim »

Hi,

It's not possible to replace our button inside MessageDialog with a custom one. But if you want the look and feel
It is straightforward to achieve by CSS, you can inspect and select the button and get the selectors and style however you want 🙂

.b-button.b-messagedialog-okbutton {}

And if you need to use MUI buttons then you'd need to use a custom popup instead of ours to apply MUI buttons.

If you have any other questions or concerns, please don't hesitate to reach out.

Best of luck,
Tasnim


Post Reply