当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


JavaScript ArcGIS FeatureTable.multiSortEnabled用法及代码示例


基本信息

以下是所在类或对象的基本信息。

AMD: require(["esri/widgets/FeatureTable"], (FeatureTable) => { /* code goes here */ });

ESM: import FeatureTable from "@arcgis/core/widgets/FeatureTable";

类: esri/widgets/FeatureTable

继承: FeatureTable > Widget > Accessor

自从:用于 JavaScript 4.15 的 ArcGIS API

用法说明

FeatureTable.multiSortEnabled函数(或属性)的定义如下:

multiSortEnabled Boolean


自从:ArcGIS 适用于 JavaScript 4.23 的 API

指示是否支持在表中对多列进行排序。将此与 FieldColumnConfig.initialSortPriorityFieldColumnConfig.direction 属性结合使用,以设置多列的排序函数。

默认值:false

例子:

const featureTable = new FeatureTable({
  layer: featureLayer,
  multiSortEnabled: true,
  fieldConfigs: [{ // autocasts to FieldColumnConfig
    name: "ObjectId",
    direction: "asc",
    initialSortPriority: 1, // This field's sort order takes second-highest priority.
  },
  {
    name: "Name",
    direction: "asc",
    initialSortPriority: 0, // This field's sort order takes the highest priority.
  },
  {
    name: "Status",
    direction: "asc",
    initialSortPriority: 2 // This field's sort order is prioritized after Name and ObjectId, respectively.
  }],
  container: "tableDiv"
});

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 FeatureTable.multiSortEnabled。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。