Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
590
On applying conditional based hyperlink to a column user experience unexpected behavior in the grid
posted

Hi

I want a small clarification on one use case related to IgrDataGrid. 

On applying conditional based hyperlink to a column user experience unexpected behavior in the grid(After scrolling this issue arises). 

You can reproduce the issue by following below-mentioned link. Also you need to add the highlighted particular change in function onPhoneCellUpdating,

https://codesandbox.io/s/elastic-varahamihira-75szqw?file=/src/index.tsx:12128-13175

After changing in the above mentioned link we can see the issues below in the  SS(you may have to scroll up or down to reproduce it).

We Hope you will provide the solution for the above mentioned issue or an alternate approach for the same.

Thanks

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Shubham,

    I have taken a look at the CodeSandbox that you provided, and I have modified some of the code to look more like what is in your screenshot. For example, here is the modification of the code:

        if (item.Age < 30) {
          link.href = "tel:" + item.Phone;
          link.textContent = item.Phone;
          link.style.color = "red";
        } else {
          link.href = "tel:" + item.Phone;
          link.textContent = "Multiple";
          link.style.color = "#4286f4";
        }

    In doing this, I cannot seem to reproduce the behavior you are seeing when scrolling the grid – the template is staying as expected as it will be re-evaluated with each new cell that is scrolled into view.

    I am linking the forked CodeSandbox here: https://codesandbox.io/s/misty-star-fn6phy?file=/src/index.tsx:12977-13240.

    If this still reproduces the behavior you are seeing, please let me know, as this could be an environmental issue if it does. It may be helpful if you can provide some further information about the system and browser you are testing on.

    Please let me know if you have any other questions or concerns on this matter.

Children