fix(module: select): dropdown broken (#4183)

This commit is contained in:
James Yeung 2024-09-10 11:40:25 +08:00 committed by GitHub
parent f3ef72990f
commit 39ba7cc945
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View File

@ -14,7 +14,7 @@ namespace AntDesign
public abstract class AntComponentBase : ComponentBase, IDisposable
{
/// <summary>
/// A <see cref="ForwardRef" /> instance. Used to get a reference to the internal DOM.
/// A <see cref="ForwardRef" /> instance. You can get a reference to the internal DOM by using <see cref="ForwardRef.Current" />.
/// </summary>
[Parameter]
public ForwardRef RefBack { get; set; } = new ForwardRef();

View File

@ -27,8 +27,9 @@ namespace AntDesign
/// <summary>
/// Returned ElementRef reference for DOM element.
/// It would set the value into <see cref="AntComponentBase.RefBack"/> that user can get the <see cref="ElementReference"/> outside.
/// </summary>
internal virtual ElementReference Ref
internal protected virtual ElementReference Ref
{
get => _ref;
set

View File

@ -8,8 +8,8 @@
<CascadingValue Value="this" IsFixed="IsSelectFixed()">
<CascadingValue Value=@("ant-select-dropdown") Name="PrefixCls" IsFixed>
<OverlayTrigger @ref="@_dropDown"
TriggerReference="RefBack.Current"
<OverlayTrigger @ref="@_dropDown"
RefBack="RefBack"
Visible="@Open"
VisibleChanged="OpenChanged"
Disabled="Disabled"
@ -42,7 +42,7 @@
<CascadingValue Value="@ShowSearchIcon" Name="ShowSearchIcon">
<CascadingValue Value="@ShowArrowIcon" Name="ShowArrowIcon">
<SelectContent Prefix="@ClassPrefix"
RefBack="@RefBack"
RefBack="@context"
@ref="_selectContent"
TItemValue="TItemValue"
TItem="TItem"