<@U0JM21UKF> You can detect a click on the tablevi...
# tornadofx
e
@jmmk You can detect a click on the tableview and deselect if there is no item in the row below the cursor, or if the cursor is not over a row. To allow blank rows to be selected would be bad though.
j
@edvin I couldn't figure out how to detect a blank row with the click event. Is that straightforward?
e
No, unfortunately not at all. JavaFX doesn't expose neat ways to get to this data easily, but a quick and dirty solution would be:
setOnMouseClicked { if (it.pickResult.intersectedNode.toString().endsWith("'null'")) selectionModel.clearSelection() }
j
@edvin thanks, that should work
e
It's not pretty though 🙂 I'll look for better ways to do this and expose it as a function once we've converted to Java 9.