{hero}

stateRestore.state().load()

始於:StateRestore 1.0.0

將 StateRestore 中的狀態載入到表格中。
請注意 - 這個屬性需要 DataTables 的 StateRestore 擴充功能。

描述

這個方法提供了將 StateRestore 擴充功能管理的狀態載入到表格中的能力。

stateRestore.state().load() 不接受任何參數。它會載入先前呼叫 stateRestore.state() 所取得的狀態。

會回傳一個 DataTables API 實例,以便可以進行進一步的鏈式呼叫。

類型

function stateRestore.state().load()

描述

將儲存的狀態從 StateRestore 擴充功能載入到表格中。

回傳

回傳一個 DataTables API 以便進行鏈式呼叫。

範例

載入一個名為「New State」的狀態

var table = new DataTable('#myTable', {
	layout: {
		topStart: {
			buttons: ['createState', 'savedStates']
		}
	}
});

table.stateRestore.state('New State').load();

相關

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