Wijmo 5 [Flex Grid]

Custom Sorting with Null value accounting in sorting

HTML

<link rel="stylesheet" href="http://cdn.wijmo.com/5.20162.198/styles/wijmo.min.css">
<script src="http://cdn.wijmo.com/5.20162.198/controls/wijmo.min.js"></script>
<script src="http://cdn.wijmo.com/5.20162.198/controls/wijmo.input.min.js"></script>
<script src="http://cdn.wijmo.com/5.20162.198/controls/wijmo.grid.min.js"></script>
<script src="http://cdn.wijmo.com/5.20162.198/interop/angular/wijmo.angular.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div ng-app="app" ng-controller="appCtrl">
        <wj-flex-grid items-source="data" style="width:500px;" >
            <wj-flex-grid-column header="Type" binding="type" data-map="dataMap" >     
           
            </wj-flex-grid-column>
            <wj-flex-grid-column header="Name" binding="name" width="*"></wj-flex-grid-column>
        </wj-flex-grid>
    </div>

JavaScript

var data = [
            { name: 'AAAx', type: 1 },           
            { name: 'Excel Import 10 accounts.xlsx', type: null },
            { name: 'Assets', type: 3 },
           
            { name: 'Income Statement', type: 2 },
            { name: 'Liabilities and Equity', type: 1 },
            { name: 'Permanent', type: 3 },
             { name: 'General', type: 2 },
              { name: 'WW.docx', type: null },
            { name: 'Untitled.pdf', type: null}           
        ];
       var array = [
       {key: 1, value: 'Maths'},
       {key: 2, value: 'Arth'},
       {key: 3, value: 'Eng'}
       ];
       
        var app = angular.module('app', ['wj']);
        app.controller('appCtrl', function ($scope) {
            $scope.data = new wijmo.collections.CollectionView(data);
			$scope.dataMap= new wijmo.grid.DataMap(array,'key','value')
            $scope.data.sortConverter = function (sd,item,value) {   
                if (sd.property == 'type' &&!item.type ) {
                    value="";
                }
                return value;
            };

        });