node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »



Knockout binding handler for ordering lists.


bower install koco-order-by-updater-binding-handler

Usage with KOCO

This is a shared module that is used in many other modules. The convention is to require the handler in the knockout-binding-handlers.js file like so:


It also includes the string-utilities library as a bower dependency. You will need to configure an alias in the require.configs.js file for the dependency if you haven't already:

paths: {
  'string-utilities': 'bower_components/koco-string-utilities/src/string-utilities',

koco-order-by-updater-binding-handler requires you to provide your own orderByFunction. To use it in a knockout template:

<a href="#" data-bind="orderByUpdater: pagingInfo, orderByUpdaterSettings: {argumentName:'AttributeName', orderByFunction: updateOrderBy, enabled:!sortable}">
Column Name