diff --git a/src/Reveal.Sdk.Dom/Data/DataSourceItem.cs b/src/Reveal.Sdk.Dom/Data/DataSourceItem.cs index 50e7678c..e078bf2e 100644 --- a/src/Reveal.Sdk.Dom/Data/DataSourceItem.cs +++ b/src/Reveal.Sdk.Dom/Data/DataSourceItem.cs @@ -253,5 +253,13 @@ private string ValidateRightFieldName(string fieldName, string alias) throw new ArgumentException($"Invalid right field name format: {fieldName}"); } + + protected void UpdateResourceItemDataSource(DataSource dataSource) + { + ResourceItemDataSource.Id = dataSource.Id; + ResourceItemDataSource.Title = dataSource.Title ?? ResourceItem.Title; + ResourceItemDataSource.Subtitle = dataSource.Subtitle ?? ResourceItem.Subtitle; + ResourceItem.DataSourceId = ResourceItemDataSource.Id; + } } } diff --git a/src/Reveal.Sdk.Dom/Data/DataSourceItems/RestDataSourceItem.cs b/src/Reveal.Sdk.Dom/Data/DataSourceItems/RestDataSourceItem.cs index 028cedee..f1855c93 100644 --- a/src/Reveal.Sdk.Dom/Data/DataSourceItems/RestDataSourceItem.cs +++ b/src/Reveal.Sdk.Dom/Data/DataSourceItems/RestDataSourceItem.cs @@ -105,15 +105,6 @@ protected override void OnFieldsPropertyChanged(List fields) Parameters.Add("config", BuildConfig(fields)); } - //todo: this may need to go on the base class. wait until more data source items are created - private void UpdateResourceItemDataSource(DataSource dataSource) - { - ResourceItemDataSource.Id = dataSource.Id; - ResourceItemDataSource.Title = dataSource.Title ?? ResourceItem.Title; - ResourceItemDataSource.Subtitle = dataSource.Subtitle ?? ResourceItem.Subtitle; - ResourceItem.DataSourceId = ResourceItemDataSource.Id; - } - private Dictionary BuildConfig(IEnumerable fields) { Dictionary config = new Dictionary();