viewIndexToModelIndex

var viewIndexToModelIndex: (Int) -> Int(source)

Converts the row index in the view to the corresponding row index in the model.

For example, if the model has rows [0, 3] with children [1, 2] and [4], respectively, and row 0 is collapsed in the view, then the view has rows [0, 3, 4] while the model has rows [0, 1, 2, 3, 4], and this method functions as the map {0: 0, 1: 3, 2: 4}. Inputs outside the view's valid row indices are not supported.

This field is used only in the methods canDrop and drop in order to implement RefinedDropSupport, which assumes that the model knows view-based indices.

See also

RowsDnDSupport.RefinedDropSupport