question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataTable produces duplicate keys (v2.13 and v2.12)

See original GitHub issue

Expected Behavior

DataTable must generate rows with unique keys.

Actual Behavior

The row’s key value is [object Object], so they are all the same.

This looks like it was also a problem in 2.12, but it was masked by “first” and “last” rows having unique keys. Since my table only had 3 rows, each row was created with a unique key.

URL, screen shot, or Codepen exhibiting the issue

v2.13 Duplicate Keys

Note: key val of each row is [object Object]

image

v2.12:

Note: The key val was still [object, object], but it was masked since the first and last rows were keyed uniquely, so my middle row key was also unique. So this masked the problem in v2.12.

image

Steps to Reproduce

This is how my DataTable is rendered:

  return (
    <DataTable
      pad={{ vertical: 'xxsmall', horizontal: 'xxsmall' }}
      caption="Addresses"
      columns={columns}
      data={protocolAddresses}
    />
  );

Your Environment

  • Grommet version: v2.13 (problem was masked in v2.12)
  • Browser Name and version: Chrome
  • Operating System and version (desktop or mobile): W10 desktop.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
IanKBovardcommented, Apr 22, 2020

Thanks, thisll help me figure this out

0reactions
ShimiSuncommented, May 12, 2020

@LiveFreeAndRoam thank you. We are considering a site refactoring, so your inputs are valuable. I attached your comment and this thread to the existing issue, and we can consider that when we’ll take steps on the docs refactoring. I’ll be closing this issue for now. Thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rolling join on data.table with duplicate keys - Stack Overflow
The reason that t_id = 1 doesn't show up in the output is because a rolling join takes the row where the key-combination...
Read more >
Determine Duplicate Rows in data.table: Extension of data.frame
table have duplicate rows (by key). unique returns a data table with duplicated rows (by key) removed, or (when no key) duplicated rows...
Read more >
Datatable – Lightning Web Component for Flow Screens
Fixed an issue with being unable to edit Apex-Defined columns unless Type was specified; Made sure that the Key Field could not be...
Read more >
Package 'data.table' - R Project
It offers fast and memory efficient: file reader and writer, aggregations, updates, equi, non-equi, rolling, range and interval joins, in a ...
Read more >
DataTable.Update throws "duplicate value cannot be inserted ...
Say I have a typed dataset with a table in it called "Version" that has a single primary key column called "VersionID" that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found