Having trouble adding rows with form inputs

Having trouble adding rows with form inputs

d_gizmod_gizmo Posts: 2Questions: 1Answers: 0
edited May 2017 in Free community support

Please see this JSFiddle: https://jsfiddle.net/LvLLc36y/4/

I'm having two problems.

I'm using KnockoutJS to draw a table in the DOM. There is a column that has text inputs.

I call DataTable() on it to get a DataTable.

Problem #1: The column of text inputs does not have value as it should.

I add a new row to the DOM table using Knockout.

I add the new row to the DataTable with row.add(newRowObject).draw()

Problem #2: The newly added row is not a text input but just the data for that column.

If you comment out the DataTable calls on line 13 and line 25 you'll see how the table ought to look

I'm just starting out using DataTables so I may be missing something obvious. My goal is to have Knockout draw and keep track of changes to my table. I'm using DataTables just for the niceties of sorting, paging, filtering, etc.

Thanks for reading this. I appreciate any help or direction. Let me know if any clarification needed.

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.