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. Image for the cookie policy date

ListView initialized with no data and virtualization enabled errors when dataSource is set later

Please see a repro in this CodeSandbox:  https://codesandbox.io/s/18yy171lyj 

4 Replies

CI Christopher Issac Sunder K Syncfusion Team April 12, 2019 12:46 PM UTC

Hi Grant, 

Greetings from Syncfusion support!! 

We have analyzed your sample. If you want to initialize the list view with empty data, then you need to bind empty data source to list view. 

We have modified the sample for binding the empty data source when click the ‘Initialize with no data’ button. 

Please check the above the sample and let us know if we misunderstood your query. 

Thanks, 
Christo 



GR Grant April 12, 2019 11:01 PM UTC

There's no fix for this issue in the updated code - you're just hiding the issue. I've reverted the sandbox code (https://codesandbox.io/s/wnm3yzj6m5). 

Below is a better description of how to see the issue:
  • Click the "Open in New Window" button for the running code

  • Display the console for the new window (F12)

  • Click the 'Initialize with data' button
    Note that 2 console logs are displayed ✔

  • Click the 'Initialize with no data' 
    Note that 1 console log is displayed, followed by a JS error (Uncaught TypeError: Cannot read property 'parentNode' of undefined)❌

  • Un-check the 'Virtualized' checkbox

  • Click the 'Initialize with no data' button
    Note that 2 console logs are displayed ✔



CI Christopher Issac Sunder K Syncfusion Team April 15, 2019 12:49 PM UTC

Hi Grant,  
 
We regret for the inconvenience.  
 
We have analyzed your online sample and your given information. We have confirmed that this is a bug in ListView. We have logged a defect report for the same. The issue will be fixed and included in our upcoming patch release which is expected to be rolled in the next week. You can track the status of the feature through the below Feedback portal link, 
 
We appreciate your patience until then. 
 
Thanks, 
Christo 



CI Christopher Issac Sunder K Syncfusion Team April 24, 2019 09:41 AM UTC

Hi Grant, 

Thanks for being patient. 

We have fixed the reported issue in enabling the virtualization with empty data source using onPropertyChange. The fix is included in the version v17.1.42 and you can now access it without getting any console error. We suggest you upgrade to the latest version to resolve the issue.    
  
  
Let us know if you need any further assistance on this.    

Thanks, 
Christo 


Loader.
Live Chat Icon For mobile
Up arrow icon