Skip to content

Instantly share code, notes, and snippets.

@mindspank
Created November 6, 2015 14:21
Show Gist options
  • Save mindspank/979a027302bc4575327e to your computer and use it in GitHub Desktop.
Save mindspank/979a027302bc4575327e to your computer and use it in GitHub Desktop.
Listbox always sorted numerical
define(['jquery'], function($) {
return {
initialProperties: {
qListObjectDef: {
qDef: {
qFieldDefs: [
'[Fiscal Year]'
],
qSortCriterias: [{
qSortByNumeric: -1,
qSortByState: 0
}]
},
qAutoSortByState: {
qDisplayNumberOfRows: -1
},
qInitialDataFetch: [{
qTop: 0,
qLeft: 0,
qHeight: 100,
qWidth: 1
}]
}
},
paint: function($element, layout) {
$element.empty();
layout.qListObject.qDataPages[0].qMatrix.forEach(function(d) {
$element.append('<p>' + d[0].qText + '</p>')
})
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment