{hero}

移除所有狀態

自:StateRestore 1.0.0

移除所有已儲存的狀態。
請注意 - 此屬性需要 DataTables 的 StateRestore 擴充功能。

說明

此按鈕可以顯示在頂層,與 savedStatescreateState 按鈕並列。此按鈕會移除所有已儲存的狀態。這會完全從儲存空間中移除狀態,並移除代表它們的按鈕。

使用此按鈕時,預設不會顯示確認視窗。

此按鈕在 StateRestore 擴充功能中使用。如果使用父按鈕的 stateRestoreConfig 設定物件的 remove 選項停用移除狀態的功能,則此按鈕將不會執行任何操作。

除了所有按鈕提供的標準設定(例如 text)之外,此按鈕沒有任何額外的設定選項。可以使用 language.buttons.removeAllStates 選項設定按鈕中的文字。

範例

修改 removeAllStates 按鈕文字

DataTable.ext.buttons.removeAllStates.text = function (e, dt, node, config) {
	return 'Remove Everything';
};