Skip to content

Tree View disordered if id greater than 10 #11

@minganp

Description

@minganp

Tree View disordered if id greater than 10.
I sugest you change like this:
_buildTreeView() {
var k = widget.data
.where((data) {
return data.getParentId() == widget.config.rootId;
})
.map((data) {
return data.getId();
})
.toSet()
.toList()
..sort((i, j) => int.parse(i).compareTo(int.parse(j)));

var widgets = List<ParentWidget>();
k.forEach((f) {
  ParentWidget p = buildWidget(f, null);
  if (p != null) widgets.add(p);
});
setState(() {
  treeView = widgets;
});

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions