Closed the-realtom closed 5 years ago
Hi, @the-realtom I am facing same issue on a production application if you could come up with a fix for it i would appreciate it if you could share it.
@maisnamraju @IchordeDionysos @binhbbbb
@Innomalist @the-realtom I'll check ASAP
This fix seems to be the culprit: #40 I'm experiencing an issue where the row keys don't match the actual data displayed in that row. So when a row is selected, the selected data is from a different row. In the below screenshots I just added a \<h1> tag to show the rowKey. So as seen below, if you select the second row, it will select data from row 9.
This line always evaluates to false which causes the
_internalSort
to run (which messes with the row keys). https://github.com/bluewatertracks/bwt-datatable/blob/76622ba11ba09a4644102f337bf61832b0cfa2e7/bwt-datatable.html#L976This is strange, because
ev.preventDefault()
is definitely being called, but thedefaultPrevented
property of the event isn't changing totrue
. I've verified this though debugging and even checking the event object straight afterev.preventDefault()
is called. https://github.com/bluewatertracks/bwt-datatable/blob/76622ba11ba09a4644102f337bf61832b0cfa2e7/bwt-datatable-card.html#L419-L425Also I can't understand why
ev.preventDefault()
is needed at all since it's a custom event? Maybe somone can explain this to me. Thanks!