We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error when closing modal with date picker or combo box

Thread ID:

Created:

Updated:

Platform:

Replies:

145898 Jul 12,2019 09:43 AM UTC Sep 4,2019 08:08 AM UTC Blazor 4
loading
Tags: ComboBox
Ivan Petrov
Asked On July 12, 2019 09:47 AM UTC

Hello,

When closing a modal containing either a combo box or date picker (or both) I get the following error - TypeError: Cannot read property 'ej2_instances' of null. I think this is a general issue since I have reported something similar and you fixed it. My code is:

@page "/counter"
@using Syncfusion.EJ2.Blazor.DropDowns
@using Data
@using Syncfusion.EJ2.Blazor.Popups
@using Syncfusion.EJ2.Blazor.Calendars

@this.ComboBoxValue



@if (this.IsModalShown == true)
{
   
       
           
           
               

               
           
       
       
           
           
               
                   
                       
                   
               
           
       
       
   
}


@code
{
    public ComboBoxFieldSettings ComboBoxFieldSettings { get; set; } = new ComboBoxFieldSettings() { Text = "ShipCity", Value = "ShipCity" };

    public bool IsModalShown { get; set; }

    public object ComboBoxValue { get; set; }

    public DateTime? Deadline { get; set; }
}



Ivan Petrov
Replied On July 12, 2019 09:49 AM UTC

For some reason my code is being posted in a strange way after editing. I will post it here again: 

@page "/counter"
@using Syncfusion.EJ2.Blazor.DropDowns
@using Data
@using Syncfusion.EJ2.Blazor.Popups
@using Syncfusion.EJ2.Blazor.Calendars

@this.ComboBoxValue

<button @onclick=@(() => this.IsModalShown = true)>Open Modal</button>


@if (this.IsModalShown == true)
{
    <EjsDialog id="dialog" header=@("Modal") width="800px" isModal="true" allowDragging="true">
        <div class="form-group row">
            <label for="Select" class="col-2 col-form-label">Select:</label>
            <div class="col-4">
                <EjsComboBox AllowCustom="true" AllowFiltering="true" @bind-value=this.ComboBoxValue DataSource=@OrdersDetails.GetAllRecords() PlaceHolder="Select an city" Fields=@this.ComboBoxFieldSettings>

                </EjsComboBox>
            </div>
        </div>
        <div class="form-group row">
            <label for="Deadline" class="col-2 col-form-label">Deadline:</label>
            <div class="col-4">
                <div id="wrapper" class="datepicker-section">
                    <div id="datepicker-control">
                        <EjsDatePicker id="datepicker" placeholder="Choose a Date" @bind-value=@this.Deadline></EjsDatePicker>
                    </div>
                </div>
            </div>
        </div>
        <button @onclick=@(() => this.IsModalShown = false)>Close</button>
    </EjsDialog>
}


@code
{
    public ComboBoxFieldSettings ComboBoxFieldSettings { get; set; } = new ComboBoxFieldSettings() { Text = "ShipCity", Value = "ShipCity" };

    public bool IsModalShown { get; set; }

    public object ComboBoxValue { get; set; }

    public DateTime? Deadline { get; set; }
}


Buvana Sathasivam [Syncfusion]
Replied On July 15, 2019 01:00 PM UTC

Hi Ivan,  
Good Day to you. 
Thanks for using Syncfusion products, From your shared code snippet, we were able to reproduce your issue. Currently we are validating your issue and will update further on this by tomorrow (07/16/19). Until then we suggest you to use Visible API to show and hide dialog in the button click.  
Regards,  
Buvana S 


Buvana Sathasivam [Syncfusion]
Replied On July 16, 2019 01:36 PM UTC

Hi Ivan, 

Thanks for your patience. 

We have validated the reported issue in “Destroy throws issue when we integrate other Blazor component inside Dialog” at EJ2 Dialog control, and we are considering this as a defect in our end. The fix for the issue will be included in our next NuGet release on end of July. 
  
You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link:  


Regards, 
Buvana S 
 


Pandiyaraj Muniyandi [Syncfusion]
Replied On September 4, 2019 08:08 AM UTC

Hi Ivan, 
 
Thanks for your patience.  
 
The reported issue Destroy throws issue when we integrate other Blazor component inside Dialog” has been fixed and included in the patch release version 17.2.49-beta. Also, we have prepared sample for your reference, get it from below link 
 
We suggest you, upgrade to the latest version to resolve this issue in your end. 
 
Regards, 
Pandiyaraj M 



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon