ant-design-blazor/components/select/SelectModeExtensions.cs
XuRui 6a52961487 feat: add select component (#222)
* fix: other values may exist in FileAttributes

* feat: add javascript interop for select component

* feat: init select component

* docs: add menu item to select docs

* feat: implement dropdownRender for select component

* docs: init select docs

* fix: remove 3.0 iframe

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-06-14 18:54:14 +08:00

22 lines
579 B
C#

using System;
namespace AntDesign
{
public static class SelectModeExtensions
{
public const string Tags = "tags";
public const string Multiple = "multiple";
private const StringComparison Comparison = StringComparison.OrdinalIgnoreCase;
public static SelectMode ToSelectMode(this string mode)
{
if (Tags.Equals(mode, Comparison))
{
return SelectMode.Tags;
}
return Multiple.Equals(mode, Comparison) ? SelectMode.Multiple : SelectMode.Default;
}
}
}