當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。