diff --git a/Extensiones/Samples/AutoRefresh_seconds/AutoRefreshDialog.js b/Extensiones/Samples/AutoRefresh_seconds/AutoRefreshDialog.js index f18c330..9de1681 100644 --- a/Extensiones/Samples/AutoRefresh_seconds/AutoRefreshDialog.js +++ b/Extensiones/Samples/AutoRefresh_seconds/AutoRefreshDialog.js @@ -43,8 +43,13 @@ let dashboard = tableau.extensions.dashboardContent.dashboard; let visibleDatasources = []; + let settings = tableau.extensions.settings.getAll(); + $('#interval').val(settings.intervalkey); + + // Load saved selected data sources selectedDatasources = parseSettingsForActiveDataSources(); + // Loop through datasources in this sheet and create a checkbox UI // element for each one. The existing settings are used to // determine whether a datasource is checked by default or not. @@ -122,7 +127,7 @@ tableau.extensions.settings.set(datasourcesSettingsKey, JSON.stringify(selectedDatasources)); tableau.extensions.settings.set(intervalkey, $('#interval').val()); tableau.extensions.settings.saveAsync().then((newSavedSettings) => { - tableau.extensions.ui.closeDialog($('#interval').val()); + tableau.extensions.ui.closeDialog($('#interval').val()); }); } })();