The Map/Route dialog is set with "CloseOnOverlayClick". As soon as I display the Route Dialog it triggers prior form validation (see the Destination red text behind the Route dialog)?
<TelerikDialog @bind-Visible="@_viewRouteMap"
ShowCloseButton="true"
CloseOnOverlayClick="true">
<DialogTitle>Route</DialogTitle>
<DialogContent>
<Map ZipCodeModelOrigin="@_selectedZipCodeOrigin" ZipCodeModelDestination="@_selectedZipCodeDestination"></Map>
</DialogContent>
</TelerikDialog>I've used my Route/Map component on other pages/components and not having this validation trigger issue. It seems if I go more than 1 level of Dialogs I'll get this issue?
The code that makes the Map/Route dialog visible:
private async Task MapGeneralRateRouteHandler(MouseEventArgs args)
{
// Get the coordinates from the ZipCodes table using current Origin, Destination zip code
_selectedZipCodeOrigin = await ZipCodeService.GetByZipCode(_rateDispatch.OriginZipCode);
_selectedZipCodeDestination = await ZipCodeService.GetByZipCode(_rateDispatch.DestinationZipCode);
_viewRouteMap = true;
}
Hi Rob,
I have two assumptions:
Our Dialog component has no relevance to validation algorithms.
Hi Dimo,
Confused, why would opening another Dialog (in this case when I click the "Route" green button) trigger validation on the current dialog? Can the behavior be prevented or circumvented?
Rob.
EDIT: oops, the issue was my error ... forgot to set ButtonType:
<TelerikButton OnClick="@MapGeneralRateRouteHandler" ButtonType="ButtonType.Button" Class="custom-compact-grid-button btn-green" Icon="@SvgIcon.Locations">Route</TelerikButton>