angular-live-set icon indicating copy to clipboard operation
angular-live-set copied to clipboard

Does not work with non-integer ids

Open jdegger opened this issue 10 years ago • 4 comments

It seems like this plugin does not work whenever the ID of an object is not an integer. Looked into the code and it seems like it's trying to create an numbered 1d array (not an object). All fine but I'm using uuid4s to identify my objects.

Whenever an object is updated the values all disappear and the whole object is replaced by just the updated key.

jdegger avatar Jun 21 '16 09:06 jdegger

I'm not sure this issue is valid now, currently investigating some more. It seems like the change-stream only updates the whole object:

case 'update':
  this._data[index] = angular.copy(change.data);
  break;

But the stream data does not contain all information. change.data only contains the updated attribute for me.

jdegger avatar Jun 21 '16 09:06 jdegger

Figured it out, whenever updateAll() is called the instance is not provided correctly to the stream to be handled by angular-live-set.

jdegger avatar Jun 21 '16 10:06 jdegger

Hey @jdegger,

I'm trying to reproduce the issue could you please reproduce the issue using our loopback-sandbox; also we welcome community PRs if you have a fix for it.

Thanks!

Amir-61 avatar Nov 30 '16 20:11 Amir-61

Closing this issue due to inactivity.

dhmlau avatar Jun 13 '18 02:06 dhmlau