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.

How to combine FormPanel, Table and DataContainer for editable tables

See original GitHub issue

If there is another way to do this, I’d love to hear it but this is the way I’ve tried so far. Maybe you can correct my method. I’ve got a table that I’ve made reactive using dataContainer:

val tableTemplate = Table(
        listOf("Column 1", "Column 2"),
        responsive = true
)

dataContainer(rowList, { element, idx, list ->
    Row {
        cell(element.one)
        cell(element.two)
}, tableTemplate)

This works well, but it is read-only. I would like to integrate a form panel into each row, something like this:


@Serializable
data class SomeClass(val one:String = "", val two:String = "")

dataContainer(rowList, { element, idx, list ->
    Row {
        val internalFormPanel = formPanel<SomeClass> {
            cell {
                this@formPanel.add(
                        SomeClass::one,
                        Text()
                )
            }
            cell {
                this@formPanel.add(
                        SomeClass::two,
                        Text()
                )
            }
        }
        add(internalFormPanel)
        internalFormPanel.setData(element)
    }
}, tableTemplate)

The result is the correct number of rows but with empty cells. What is the correct way to create editable tables?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
rjaroscommented, Apr 18, 2019

I’v got a Tabulator module on my (long) TODO list 😉

I’m also aware of some performance problems with both data container and redux module, which both work with the same pattern - by removing and recreating components inside a container. I’m trying to apply some optimizations. Maybe you could share a sample project in which you encounter these problems.

1reaction
rjaroscommented, Apr 23, 2019

kvision-tabulator module is almost ready. It will be available in the next realese.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using a Data Connection to Join Tables in a Form Data Model
Working with a database typically requires accessing more than a single table. This video shows you how to create data connections in your ......
Read more >
Angular material Data table with form data - Medium
In this article, we'll have a look at how to load an Angular material Data table with form data by going through an...
Read more >
Angular Material editable table using FormArray
Question. How can I make mat-table use [formGroupName] so that the form fields can be referenced by its correct form path?
Read more >
Editor example - In table form controls
This example shows the use of the create() , edit() and remove() API methods, ... Combine the first and last names into a...
Read more >
Customize Dynamic Tables and Forms - Oracle Help Center
To open a rule set, you can select the dynamic form or table in the Page Designer and open its rule set from...
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