Need to change 'idProperty' used in gridSee original GitHub issue
I use Slickgrid very powerfully.
I think many functions are working normally and are grid with good performance such as rendering speed.
But there’s one problem that’s been bothering me for a very long time.
The value of
idProperty used in the grid is
I don’t think it’s just me.
Let me give you an example that I use.
I’m using a grid in a kind of database tool and I’m using it to express the results of SQL.
I ran a very simple SQL(
select "id", 1, 1, 1;).
Reproduce situations where problems can occur.
SQL that can cause grid errors
select "id", 1, 1, 1
select "id", 2, 2, 2
select "id", 3, 3, 3
I have given a simple example, but I actually think that the
primary key of several tables can be ‘id’.
What I want to say here is simple.
Q1. @6pac Is it possible to change the value of ‘idProperty’ to a value that will not overlap?
Currently, I am using the value by changing it directly. That made it difficult for me to use the plugins. Help me. 😃
- Created 4 years ago
- Comments:8 (1 by maintainers)
Top GitHub Comments
Yep, agree with @ghiscoding, looks like
setItemsis the way to change the
idProperty. I don’t think a PR is needed, since you’re always going to be using
setItemsat some point to initialise the data.
setItems(dataset, objectIdProperty)like shown in this line, that is when you create the DataView instance and you pass it the dataview. The
objectIdPropertyis really how to override the
idand it’s optional, so if you don’t pass it, then it will use
id. So unless I misunderstood, that is the way to go