{hero}

searchPanes.threshold

自:SearchPanes 1.0.0 起

設定在欄位中顯示其窗格所需的唯一值與總值之最小比例。
請注意 - 此屬性需要 DataTables 的 SearchPanes 擴充功能。

描述

此選項是 searchPanes.threshold 的別名,在使用 DataTables 2+ 時應優先使用。無論窗格如何插入到文件中(layoutsearchPanes),它都可以用來配置 SearchPanes。

請參閱 searchPanes.threshold 的文件以取得此選項的完整詳細資訊。

類型

小數

描述

透過將 searchPanes.threshold 選項設定為 0 到 1 之間的小數值,可以變更自動顯示窗格的時機。

預設值

  • 數值:0.6

searchPanes.threshold 參數的預設值為 0.6

範例

變更唯一性比例的閾值

new DataTable('#myTable', {
	layout: {
		top1: 'searchPanes'
	},
	searchPanes: {
		threshold: 0.4
	}
});

相關

以下選項直接相關,在您的應用程式開發中可能也很有用。