From 0b800881e320f81006a5cc0515d17ccf4434fb0a Mon Sep 17 00:00:00 2001 From: yekalkan Date: Wed, 2 May 2018 13:47:52 +0300 Subject: [PATCH] Select tag helper items refactoring part 2 --- .../TagHelpers/Form/SelectItems.cs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/SelectItems.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/SelectItems.cs index cba8355c78..d9001aa232 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/SelectItems.cs +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/SelectItems.cs @@ -32,22 +32,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form var selectItems = (properties.First().Model as IEnumerable).ToList(); - SetSelectedValue(selectedValue, selectItems); - return selectItems; } - - private static void SetSelectedValue(string selectedValue, List selectItems) - { - if (!selectItems.Any(si => si.Selected)) - { - var itemToBeSelected = selectItems.FirstOrDefault(si => si.Value.ToString() == selectedValue); - - if (itemToBeSelected != null) - { - itemToBeSelected.Selected = true; - } - } - } } }