|
<SfDialog @ref="@dialogObj" @bind-Visible="@isVisible" Height="400px" Width="70%">
<DialogTemplates>
<Header>Dialog Header</Header>
<Content>
<p>Dialog Content with dropdown</p>
<SfDropDownList TValue="string" TItem="Games" Placeholder="Select a game" DataSource="@LocalData">
<DropDownListFieldSettings Value="ID" Text="Text"></DropDownListFieldSettings>
</SfDropDownList>
</Content>
</DialogTemplates>
</SfDialog> |
Hello Syncfusion,
I use something like this as well and it works on the web, but not on the phone.
See images.
<SfDialog Width="25%" @bind-Visible="@isVisible" IsModal="true" ShowCloseIcon="false">
<DialogTemplates>
<Header>@header </Header>
<Content>
@content <br/>
Selecteer Medewerker:
<Syncfusion.Blazor.DropDowns.SfDropDownList TValue="int" TItem="Inzicht_Storing.Persoon" DataSource="@PersonenList">
<Syncfusion.Blazor.DropDowns.DropDownListFieldSettings Value="ID" Text="VolledigeNaam"></Syncfusion.Blazor.DropDowns.DropDownListFieldSettings>
<Syncfusion.Blazor.DropDowns.DropDownListEvents OnValueSelect="OnSelectMedewerker" TValue="int" TItem="Inzicht_Storing.Persoon"></Syncfusion.Blazor.DropDowns.DropDownListEvents>
</Syncfusion.Blazor.DropDowns.SfDropDownList>
Selecteer Status:
<Syncfusion.Blazor.DropDowns.SfDropDownList TValue="int" TItem="Status" DataSource="@StatusList">
<Syncfusion.Blazor.DropDowns.DropDownListFieldSettings Value="ID" Text="StatusType"></Syncfusion.Blazor.DropDowns.DropDownListFieldSettings>
<Syncfusion.Blazor.DropDowns.DropDownListEvents OnValueSelect="OnSelectStatusType" TValue="int" TItem="Status"></Syncfusion.Blazor.DropDowns.DropDownListEvents>
</Syncfusion.Blazor.DropDowns.SfDropDownList>
</Content>
</DialogTemplates>
<DialogButtons>
<DialogButton Content="Save" IsPrimary="true" OnClick="SaveDialog"></DialogButton>
<DialogButton Content="Cancel" OnClick="CloseDialog"></DialogButton>
</DialogButtons>
</SfDialog>
I am sorry for the late reply.
I've found "the problem". When you open the dialog from lower in the page (scrolling needed) the dropdown position is not right.
In the updated file there is an example with a height of 1500px and the button at the bottom to open the dialog.
Is there a way that the dropdown will always position itself based on the dialog?
|
<SfDialog Width="25%" @bind-Visible="@isVisible" IsModal="true" ShowCloseIcon="true" Height="300px">
<DialogTemplates>
<Header>@header </Header>
<Content>
@content
<br />
Selecteer Medewerker:
<SfDropDownList TItem="Countries" TValue="string" Placeholder="Select a country" PopupHeight="auto" DataSource="@Country">
<DropDownListEvents TItem="Countries" TValue="string" ValueChange="ChangeCountry" Opened="OnOpen"></DropDownListEvents>
<DropDownListFieldSettings Text="CountryName" Value="CountryId"></DropDownListFieldSettings>
</SfDropDownList>
Selecteer Status:
<SfDropDownList TValue="string" TItem="State" @bind-Value="@StateValue" Placeholder="Select a state" Query="@StateQuery" PopupHeight="auto" DataSource="@States">
<DropDownListEvents TItem="State" TValue="string" Opened="OnOpen"></DropDownListEvents>
<DropDownListFieldSettings Text="StateName" Value="StateId"></DropDownListFieldSettings>
</SfDropDownList>
</Content>
</DialogTemplates>
<DialogButtons>
<DialogButton Content="Save" IsPrimary="true"></DialogButton>
<DialogButton Content="Cancel"></DialogButton>
</DialogButtons>
</SfDialog> @code { public void OnOpen(PopupEventArgs args)
{
args.Popup.OffsetY = 1;
} } |
I also have this problem (iPad/iPhone). This crutch works.
PS It was fixed. It is working in the latest package (24.1.44)
PPS SfTimePicker still has a problem (list is opened in the center of dialog on iPad/iPhone)
Hi Randy,
Thank you for reaching out.
We've investigated the issue you reported regarding the SfTimePicker on iPad/iPhone. After thorough validation, we would like to inform you that the behavior you observed, where the Timepicker popup is displayed in the center of the screen on iPad/iPhone, is the intended design of the component. This is the default behavior for the Timepicker popup.
For your reference, you can view the video illustration of this behavior below:
Sample: https://blazorplayground.syncfusion.com/LZVTZiLOesqixCii
If you have any further questions or concerns, please feel free to let us know. We appreciate your understanding.