Javafx adding row dynamically duplicates data

I have a Tableview in Javafx in which I’m trying to add a row dynamically when user presses a button. The problem is that when doing it the previous data in the table gets duplicated. I must say that if I print the size of the items in the table, it returns the correct size,… Read More Javafx adding row dynamically duplicates data

When isEditing is true, my texts are not aligned as seen in the picture. What is the reason?

Important : Tableview constraints codes are in a separate file. Edit Button Code @objc func didTapEdit(){ if plansListTableView.isEditing { plansListTableView.isEditing = false } else { plansListTableView.isEditing = true } } Constraints Code private func addConstraints(){ addSubview(planLabel) NSLayoutConstraint.activate([ planLabel.centerYAnchor.constraint(equalTo: centerYAnchor), planLabel.leadingAnchor.constraint(equalTo: safeAreaLayoutGuide.leadingAnchor, constant: 20) ]) } >Solution : Add the label to contentView private func addConstraints(){… Read More When isEditing is true, my texts are not aligned as seen in the picture. What is the reason?

set heightForRowAt for specific UITableViewCell

Hi developers I’m stuck trying to find a way to set heightForRowAt on a UITableViewCell this is my cellForRowAt func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { guard let rows = rows, rows.count > indexPath.row, let row = rows[indexPath.row] as StationDetailsRowType? else { return UITableViewCell() } switch row { case .mapLocation: return configureMapCell(indexPath:… Read More set heightForRowAt for specific UITableViewCell

Returning counting result from Firebase Query

I try to get the amount of rows in my Firebase. But is says cannot find counter in scope on line return counter. extension FourthTabFirstView: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { let ref = database.child("placeID") ref.observe(.value, with: { (snapshot: DataSnapshot!) in print(snapshot.childrenCount) let counter = snapshot.childrenCount }) return counter… Read More Returning counting result from Firebase Query

My TableCell doesn't auto-update FXCollections.observableArrayList

I’m sorry I get some trouble with TableView. If I tick checkbox my dati = FXCollections.observableArrayList(); isn’t auto-updated Where I am wrong? I have missing some code. I set editable the TableView. Table has two rows and each row have checkbox. In agreement FXCollections.observableArrayList(); documentation Creates a new empty observable list that is backed by… Read More My TableCell doesn't auto-update FXCollections.observableArrayList