roubachof / Sharpnado.CollectionView

A performant list view supporting: grid, horizontal and vertical layout, drag and drop, and reveal animations.
The Unlicense
244 stars 30 forks source link

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

Closed ali-h2010 closed 2 years ago

ali-h2010 commented 2 years ago

Platform (please complete the following information):

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

roubachof commented 2 years ago

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

ali-h2010 commented 2 years ago

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

roubachof commented 2 years ago

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.

ali-h2010 commented 2 years ago

@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.

ali-h2010 commented 2 years ago

@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.

roubachof commented 2 years ago

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...

ali-h2010 commented 2 years ago

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.