Premium support for our pure JavaScript UI components


Post by matb »

Instead of using the cellClick event and/or the column context menu, we would like to use native anchor elements in the columns renderer.

Desired behaviour:
CTRL + click or target="_blank" will open the destination in a new tab

Observed behaviour:
Neither will open the destination in a new tab, but the current tab.

Our configuration:

  const columns = {
    data: [{
        type: 'tree',
        text: '',
        field: 'name',
        htmlEncode: false,
        renderer({ record }) {
          return `
          <div>
            <a href="some-destination" target="_blank">click me</a>
            <a href="some-other-destination" target="_blank">click me, too</a>
          </div>
          `;
        },
      },
    ],

Is there anything we can do, to make it work?


Post by marcio »

Hey,

I added your code to our React demo and it worked correctly when clicking the link, it opened in a new tab (as you'll see in the video).

Which version are you using?

Attachments
Bryntum Scheduler Pro - Pro inline data demo - 23 March 2023.mp4
(290.39 KiB) Downloaded 17 times

Best regards,
Márcio


Post by matb »

Thanks for your quick response. We are using 5.3.1 and since we switched to a combined solution with rendered anchors together with a cellClick listener we don't have any issue anymore.


Post by alex.l »

Thank you for the update!

All the best,
Alex


Post Reply