{hero}

language.stateRestore.creationModal.toggleLabel

自:StateRestore 1.0.0 起

設定顯示在切換核取方塊旁的標籤文字。
請注意 - 此屬性需要 DataTables 的 StateRestore 擴充功能。

描述

此字串會顯示在建立模式中的切換核取方塊旁邊的標籤。 這些核取方塊允許使用者設定該狀態要儲存的內容。它們使用 stateRestoreConfigtoggle 選項進行配置。

類型

字串

描述

將顯示為建立模式中切換核取方塊旁邊標籤的字串。

預設

  • 值:包含:

範例

更改重新命名模式標題

new DataTable('#myTable', {
	language: {
		stateRestore: {
			creationModal: {
				toggleLabel: 'Toggles'
			}
		}
	},
	layout: {
		topStart: {
			buttons: [
				{
					extend: 'createState',
					config: {
						creationModal: true,
						toggle: {
							search: true
						}
					}
				},
				'savedStates'
			]
		}
	}
});

相關

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