How to combine FormPanel, Table and DataContainer for editable tables
See original GitHub issueIf 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:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top 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 >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
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.
kvision-tabulator module is almost ready. It will be available in the next realese.