Open danicomas opened 9 years ago
Hi @danicomas ,
Sorry for the late reply.
Actually this is not a bug, I intentionally made it to remove empty groups. But I guess you're right, it should be able to display empty groups. Will update on the next release.
Nice @isteven
Hi @isteven what is the status of this issue? would it be possible to select the group head to select all its members including the header?
For those still interested: The crucial code block in isteven-angular-multiselect/isteven-multi-select.js seems to be
if (
(
!$scope.filteredModel[ $scope.filteredModel.length - 1 ]
||
typeof $scope.filteredModel[ $scope.filteredModel.length - 1 ][ attrs.groupProperty ] !== 'undefined'
)
&&
(
!$scope.filteredModel[ $scope.filteredModel.length - 1 ]
||
$scope.filteredModel[ $scope.filteredModel.length - 1 ][ attrs.groupProperty ] === false
)
) {
$scope.filteredModel.pop();
}
else {
$scope.filteredModel.push( $scope.inputModel[ i ] );
}
You might want to change it so that $scope.filteredModel.push( $scope.inputModel[ i ] );
is either always called or based on an attribute condition.
The following should work:
Now only load if I have childs!