question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic Table Data

See original GitHub issue

The following code used to work, but ceased to do so a while ago (I really should cover it better in tests!): (used to work = data was displayed)

/**
 * Makes properties of delegate available for display in tabulator.
 * For regular TObjects these are members (properties).
 * For FixtureResults these are: result, resultClass etc.
 *
 * Exposer bears some similarity to the JS "Revealing Module Pattern"
 * (see: https://addyosmani.com/resources/essentialjsdesignpatterns/book/),
 * but it goes further since it even reveals members of it's delegate.
 */
@Serializable
class Exposer(val delegate: TObject) {

    var iconName = ""
    var selected = false 

    fun dynamise(): dynamic {
        val thys = this.asDynamic()
        for (m in delegate.members) {
            val member = m.value
            if (member.memberType == MemberType.PROPERTY.type) {
                val realValue = member.value
                if (realValue != null) {
                    thys[member.id] = realValue.content
                }
            }
        }
        iconName = IconManager.find(delegate.title)
        if (iconName == IconManager.DEFAULT_ICON) {
            iconName = IconManager.find(delegate.domainType)
        }
        return thys
    }

    // eg. for dataNucleusId
    fun get(propertyName: String): Any? {
        return this.delegate.getProperty(propertyName)?.value
    }

}

I added in @OptIn(ExperimentalJsExport::class) and @JsExport without success.

Was there any change in KVision, Tabulator, or Kotlin that broke this code?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:25 (25 by maintainers)

github_iconTop GitHub Comments

1reaction
rjaroscommented, Jul 7, 2021

When it comes to Window component I will:

  • change access modifier of most private properties to protected (e.g. header, caption), so you will be able to inherit and modify them instead of creating your own class.
  • add two new events, which will allow intercept dragging, even without inheritance:
        onEvent {
            dragStartWindow = {
                self.getElementJQuery()?.css(
                    "opacity",
                    "0.5"
                )
            }
            dragEndWindow = {
                self.getElementJQuery()?.css(
                    "opacity",
                    "1.0"
                )
            }
        }
1reaction
joerg-radecommented, Jul 7, 2021

With kotlin.js.compiler=legacy and without formatterComponentFunction it works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic Tables in Excel ( Using Pivot Table and Formulas)
Dynamic Table is the table where we have to update the range of data repeatedly. The Pivot Table option can create dynamic Tables...
Read more >
Dynamic table - Examples - Components
A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.
Read more >
Dynamic Tables: Delivering Declarative Streaming Data ...
Dynamic Tables are a new table type in Snowflake that lets teams use simple SQL statements to declaratively define the result of your...
Read more >
Handling Dynamic Web Tables Using Selenium WebDriver
There are two types of HTML tables published on the web- Static tables: Data is static i.e. Number of rows and columns are...
Read more >
Dynamic table
Dynamic Tables are only available when the loaded record set or Data Mapping Configuration contains transactional data in one or more detail ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found