我看到有关添加“禁用排序”的信息,但不知道如何删除第3次单击禁用排序并在可排序标题上“中立”的默认行为。实际上,具有禁用排序状态会因为实际上不会更改排序顺序而感到损坏。如何摆脱第三种状态,只需切换DESC
和 columns:any[] = [
{ name:'Email', field:'email' },
{ name:'Sessions', field:'sessionCount', enableSorting:false} //something like enableClearSorting:false
]
?
import * as _ from 'highland';
import oboe = require('oboe');
const idStream = _((push: any, next: any) => {
oboe({
url: 'http://foo.bar/overview',
method: 'GET',
headers: {
'X-Token': token,
},
}).node('{id narf poit}', (overview) => {
push(null, overview.id);
return oboe.drop;
}).done((response) => {
// without drop, the entire response would now be stored here
push(null, _.nil);
}).fail((reason) => {
console.error(reason);
push(null, _.nil);
});
});
idStream.each((id: number) => {
console.log(id);
});
答案 0 :(得分:2)
您可以使用suppressRemoveSort属性:
columns:any[] = [
{ name:'Email', field:'email' },
{ name:'Sessions', field:'sessionCount', enableSorting:false, suppressRemoveSort: true }
]