Dynamic Table Data
See original GitHub issueThe 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:
- Created 2 years ago
- Comments:25 (25 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When it comes to
Window
component I will:With
kotlin.js.compiler=legacy
and withoutformatterComponentFunction
it works!