-1

I'm working on an application which resides in a sandbox so I'm not able to create the project over here.

But the issue I'm facing is that no matter what I have tried for the past couple of weeks I am not able to get the DataTable to select the rows automatically when I make selections on my Leaflet map.

I'm able to update the DataTable values for what is selected. But, the UI will not automatically show those rows as selected until I mouse over the table itself.

I have even tried at the suggestion of another post setting the focus on the div by adding in a tabindex value for the div that houses the data table, as well as setting and confirming all values are correct in value and type for what gets set for the bound var for the datatable.

Anyone have a stackblitz site or something that actually uses two disparate components that can update each other with use of the DataTable and it auto sets the highlighted row?

I'm dying here.

edjm
  • 4,830
  • 7
  • 36
  • 65
  • Yes, you can show many maps and datatables on same page. I have implemented same. Please check browser console. or post simple code here – Rahul Mahadik Mar 18 '20 at 05:05
  • Link to another post I had which dealt with the issue of selecting rows in the datatable from external calls. My external calls were made from use of the leaflet map.: https://stackoverflow.com/questions/60599248/how-to-get-datatable-to-select-highlight-from-external-selection-without-setting/65226373#65226373 – edjm Dec 10 '20 at 12:23

1 Answers1

0

The information to resolve this issue I was having has been resolved under a different forum post I had here on SO

How to get DataTable to select/highlight from EXTERNAL SELECTION without setting focus on datatable?

edjm
  • 4,830
  • 7
  • 36
  • 65
  • The answer is to use this.ngZone.run(() => this.tableRef.selected = this.newRowSelection); – edjm Apr 02 '20 at 16:32