igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

Deprecate rowID and rowData in interfaces

Open hanastasov opened this issue 3 years ago • 4 comments

Following the removal of rowID and rowData properties from IgxRowDirective and all public classes implementing the RowType interface, considering the following:

Deprecate the old rowID and rowData from any or all of the following:

and introduce the new key and rowData

hanastasov avatar Nov 23 '21 13:11 hanastasov

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jan 23 '22 00:01 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Mar 27 '22 00:03 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar May 28 '22 00:05 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Sep 17 '22 00:09 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Nov 21 '22 00:11 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jan 21 '23 00:01 github-actions[bot]

With https://github.com/IgniteUI/igniteui-angular/pull/12394, a primaryKey property was introduced in the IGridEditDoneEventArgs and IRowDataEventArgs:

Current task, however, aimed to replace rowID with key, so now we have inconsistencies between IGridEditDoneEventArgs and IRowDataEventArgs and other interfaces. see:

image

Shall we replace rowID with key or with primaryKey in your opinion, @damyanpetev and @wnvko ?

primaryKey according to Desi would be counter intuitive, since its naming is the same as the grid property.

If we dont change, however, there would be inconsistency, as shown above.

It seems like a trade-off and I am ok to go with the incosistency - it would be key in most cases, only for the interfaces it would be primaryKey in favour of codegen service.

hanastasov avatar Apr 11 '23 09:04 hanastasov

I would go with key everywhere. I know we just added primaryKey, but let change it to key.

wnvko avatar Apr 12 '23 06:04 wnvko

I would go with key everywhere. I know we just added primaryKey, but let change it to key.

Just to remind tt went from key to primaryKey in https://github.com/IgniteUI/igniteui-angular/pull/12394 by demand.

hanastasov avatar Apr 12 '23 07:04 hanastasov

@wnvko The argument was explicitly renamed from key to primaryKey because it was not the same type - as in it'll never switch to the row object to use as identifier when a primaryKey on the Grid is not defined and will be empty instead. So it's indeed primary key only and best not to mix it with the key concept on row.

IIRC, the argument was actually only on the delete event btw (since that's where it was needed), yet it might've crept up to some other events? Did we end up with events that have both key and primaryKey? Cuz that'd be super awkward lol

damyanpetev avatar Apr 12 '23 11:04 damyanpetev

Thanks.

  1. No, we didn't end up with events that have both key and primaryKey
  2. Yes, the primaryKey argument also crept into add and edit events, not only rowDeleted. That's totally my mistake as I did not extend the row deleted arguments, as task was logged, but for me it "made sense" to do the same for edit and add events.

Will try to fix this in current PR.

hanastasov avatar Apr 12 '23 12:04 hanastasov

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jun 25 '23 00:06 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Aug 26 '23 00:08 github-actions[bot]

Plan for version 17.

hanastasov avatar Sep 18 '23 08:09 hanastasov

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jan 09 '24 00:01 github-actions[bot]