本文整理汇总了TypeScript中Immutable.List.sortBy方法的典型用法代码示例。如果您正苦于以下问题:TypeScript List.sortBy方法的具体用法?TypeScript List.sortBy怎么用?TypeScript List.sortBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Immutable.List
的用法示例。
在下文中一共展示了List.sortBy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: h
const renderGroupDeployNodes = (groupDeploys: List<DeployRecord>, deployGroup: DeployGroupRecord) => {
const shouldShowProjectNames = !groupDeploys.equals(currentDeploys);
return h(
'li',
{ className: `deploy deploy--${deployGroup.status.split(' ').join('-').toLowerCase()}` },
[
h('h2', [
h('a', { href: createBuildLink(deployGroup.build) }, `${deployGroup.build}`)
]),
// Only show project names if we have multiple deployed groups
exp(shouldShowProjectNames) && ih('ul', {}, groupDeploys
.sortBy(build => build.projectName)
.map(deploy => {
const previousBuild = previousDeploysMap.get(deploy);
return h('li', [
h('a', {
href: createRiffRaffDeployLink(deploy.uuid),
title: previousBuild ? `Previous build: ${previousBuild.build}` : ''
}, deploy.projectName)
]);
})
.toList()
)
]
);
};