fix(module: cascader): make boudary adjust mode default to InView (#2999)

This commit is contained in:
James Yeung 2023-01-09 15:25:19 +08:00 committed by GitHub
parent 1b52c4a7b8
commit 63012ad787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 1 deletions

View File

@ -16,7 +16,7 @@ namespace AntDesign
/// <summary>
/// Overlay adjustment strategy (when for example browser resize is happening)
/// </summary>
[Parameter] public TriggerBoundaryAdjustMode BoundaryAdjustMode { get; set; } = TriggerBoundaryAdjustMode.None;
[Parameter] public TriggerBoundaryAdjustMode BoundaryAdjustMode { get; set; } = TriggerBoundaryAdjustMode.InView;
[Parameter] public bool ChangeOnSelect { get; set; }

View File

@ -0,0 +1,28 @@
<Select Mode="tags"
DataSource="@_items"
@bind-Values="@_selectedValues"
TItemValue="string"
TItem="string"
EnableSearch>
</Select>
<Button OnClick="@OnButtonClick">Click me to update datasource</Button>
@code
{
List<string> _items = new List<string>();
IEnumerable<string> _selectedValues;
protected void OnButtonClick()
{
const int min = 10;
const int max = 36;
for (var i = min; max > i; i++)
{
var value = Convert.ToString(i, 16).PadLeft(2, '0') + i.ToString();
_items.Add(value);
}
}
}