Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #102536
    Matias Galante

    Hello, I’m wanting the grid to come with the first row pre selected and this is how I’ve done it programmatically so far:

    const id = await this.grid.getRowId(0);;

    However, the color is –smart-ui-state-selected which is a light shade of blue, is it possible to use the –smart-primary which is a dark blue? It’s the same blue color as when you click on a row?


    Yavor Dashev

    Hi Matias,

    There is a bit difference between using a row with the select method and when its done through user interaction and the main difference is that the user interaction set an focus attribute on the row.

    Anyway you can achieve this functionality and I have created a quick code snippet on how to achieve this:

            setTimeout(() => {
                let row:any = document.querySelectorAll('smart-grid-row')[0];
                row.setAttribute('focus', '')
            }, 500);

    Let me know if that works for you!

    Please, do not hesitate to contact us if you have any additional questions.

    Best regards,
    Yavor Dashev
    Smart UI Team

    Matias Galante

    That worked, thank you

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.