roubachof/Sharpnado.CollectionView

Item setting is not being called and item view is not refreshing

Closed this issue · 7 comments

Platform (please complete the following information):

  • OS: [iOS/Android/Both]
    iOS

  • Device: [iPhone6/iPhoneSimulator/Pixel/AndroidEmulator/...]
    iPhoneSimulator

  • Sdk vervion: [iOS 11/Android SDK 21]
    iOS 15.2

  • Xamarin.Forms: [3.4.0.1029999]
    5.0.0.2196

Describe the bug
setter is not being called and views are not being refreshed when updating the binded values.

To Reproduce
Steps to reproduce the behavior:

  1. Go to GridView
  2. Update the Observable collection to allow setter as well as the targeted property
  3. Add a button that will update the Name property of the first item.
  4. See error

Exceptions (if applicable)
Item should be updated and view should be refreshed but it doesn't.

Screenshots (if applicable)
Simulator Screen Shot - iPhone 13 - 2022-03-06 at 15 37 02

Reproduction Link
https://github.com/ali-h2010/Testing-Sharpnado.CollectionView-main/blob/main/README.md

The "name" property of the SiilyDudeVmo is not a bindable property (it doesn't raise NotifyPropertyChanged). So it's the normal behavior

The "name" property of the SiilyDudeVmo is not a bindable property (it doesn't raise NotifyPropertyChanged). So it's the normal behavior

But it is part of the observable collection which is bindable. "Name" is just a property of that observable modle.

Is it not possible to update the list from an external button after it was created?

Strangely, in the contractor of my app, the change is reflected but not after creation

But it is part of the observable collection which is bindable. "Name" is just a property of that observable modle.

Yes the item is bindable but not the property of the item. This is 2 different things. If it's working without raising property changed, it means that a project uses some kind of code generation tool like Fody to make all the public properties automatically bindable.

@roubachof , I was able to update the property of the item in the list when i made the properties of the model inside the observable collection call OnPropertyChanged as suggested. Surprisingly, i added a normal list and it's updating fine without this step.

@roubachof, do you have any support platform like "Buy Me a Coffee" or Paybal?
Your solution helped me greatly, it's much better than popular UI frameworks without naming any.

hey @ali-h2010, I have no sponsor or buy me a coffee thing. I get paid by company not individuals.
But if your company wants to thank me I can issue an invoice for a special service:

  1. coaching
  2. optimizing
  3. N priority bug fixing on sharpnado component

etc...

I would love to but i don't have such power as a normal developer. Most enterprise companies consult other enterprise companies or organizations. However, i can still recommend your services whenever possible.

Thanks again.