NSTableViewCell is Blank During Re-ordering

I have a standard NSTableView that allows re-ordering.

The cells of the NSTableView are UITextFields

The problem is: during re-ordering, the cell is blank (see image below).

What can I do to ensure that the text value of the UITextField is shown during the re-ordering of the cells?

enter image description here

The code for the TableView cells is as follows:

func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
    let view = NSTextField.init()
    view.placeholderString = "enter text here..."
    view.stringValue = data[row]
    return view
}