mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 13:37:35 +08:00
41077bc2fb
* select-rewritten select-rewritten * modul: select - update 1 * select-update2 * select-update3 * select-update 4 * feat: append label tag & auto tokenization * fix: conflict in drpdown demo Co-authored-by: Lars Diederich <diederich@evodata.de> Co-authored-by: ElderJames <shunjiey@hotmail.com>
24 lines
664 B
C#
24 lines
664 B
C#
using System;
|
|
|
|
#pragma warning disable 1591 // Disable missing XML comment
|
|
|
|
namespace AntDesign.Select.Internal
|
|
{
|
|
internal static class SelectModeExtensions
|
|
{
|
|
internal const string Tags = "tags";
|
|
internal const string Multiple = "multiple";
|
|
private const StringComparison Comparison = StringComparison.OrdinalIgnoreCase;
|
|
|
|
internal static SelectMode ToSelectMode(this string mode)
|
|
{
|
|
if (Tags.Equals(mode, Comparison))
|
|
{
|
|
return SelectMode.Tags;
|
|
}
|
|
|
|
return Multiple.Equals(mode, Comparison) ? SelectMode.Multiple : SelectMode.Default;
|
|
}
|
|
}
|
|
}
|