Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    fieldName generated in record by recordSummaryFunction

    Hi, I just noticed that when I define a summary field with an explicit recordSummaryFunction, if the field is named foobar, the record ends up containing a _foobar property.
    Is this behaviour something I can rely on, or should it be considered an internal detail that shouldn't be used?

    #2
    That should be considered an internal detail, but if there's some use case where you need the value, we could consider doc'ing how to get it.

    It's not trivial because we'd have to explain the rules around when you can expect it to be there, be recalculated, etc.

    Comment


      #3
      Hi, thanks for the reply! Actually, it was just to avoid duplicating the calculation logic, but I see that I can write a single method since I have access to the field reference in the various methods I need - including in hoverHTML via this.

      Speaking of the latter method, it might be worth mentioning in the docs that the value represents the HTML content of the cell (in my case, the field uses valueIcons).

      Is it expected that getValueIconCursor returns the rawValue instead?
      Last edited by claudiobosticco; 31 Jul 2025, 11:32.

      Comment


        #4
        Originally posted by claudiobosticco View Post
        Hi, thanks for the reply! Actually, it was just to avoid duplicating the calculation logic, but I see that I can write a single method since I have access to the field reference in the various methods I need - including in hoverHTML via this.

        Speaking of the latter method, it might be worth mentioning in the docs that the value represents the HTML content of the cell (in my case, the field uses valueIcons).

        Is it expected that getValueIconCursor returns the rawValue instead?
        We'll consider the documentation clarification you mention. In the case of ListGrid.getValueIconCursor(), it's expected to return a value of type Cursor, which is just the name for the mouse cursor that should be used for that cell. So it seems correct.

        Comment


          #5
          Originally posted by Isomorphic View Post

          We'll consider the documentation clarification you mention. In the case of ListGrid.getValueIconCursor(), it's expected to return a value of type Cursor, which is just the name for the mouse cursor that should be used for that cell. So it seems correct.
          Sorry, I misspoke - I meant that the value parameter in getValueIconCursor is actually the rawValue (unlike the value parameter in hoverHTML).

          Comment


            #6
            It seems the value passed to getValueIconCursor() can be the raw cell value in many cases (though not all - e.g. if deprecated method LGF.getCellValue() is defined). The difference vs. what's passed to hoverHTML() is likely because the latter returns HTML, so getting passed the cell's HTML as an input (to modify or pass through) would be natural. On the other hand getValueIconCursor() doesn't return HTML so perhaps it was thought more useful to make the raw cell value available.

            Comment

            Working...
            X