Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {PokemonComparator} from "../utils/pokemon-comparator";
import {EXAMPLES} from "./examples";
@Component({
selector: "clr-datagrid-sorting-demo",
providers: [Inventory],
templateUrl: "./sorting.html",
styleUrls: ["../datagrid.demo.scss"]
})
export class DatagridSortingDemo {
examples = EXAMPLES;
users: User[];
usersDeprecated: User[];
sortOrder: SortOrder = SortOrder.Unsorted;
sorted: boolean = false;
descSort: SortOrder = SortOrder.Desc;
pokemonComparator = new PokemonComparator();
constructor(private inventory: Inventory) {
inventory.size = 10;
inventory.reset();
this.users = inventory.all;
this.usersDeprecated = inventory.all;
}
}