mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 17:31:42 +08:00
6a52961487
* 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>
22 lines
579 B
C#
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;
|
|
}
|
|
}
|
|
}
|