Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Control ItemTemplate fails to change at runtime in MAUI iOS #24492

Open
prathameshnarkhede opened this issue Aug 28, 2024 · 4 comments
Open
Labels
area-controls-listview ListView and TableView p/3 Work that is nice to have platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@prathameshnarkhede
Copy link

Description

When I create Custom Control on top of ListView and try to change ItemTemplate at runtime, The ListView does not get new ItemTemplate in iOS.

Steps to Reproduce

  1. Create Custom control over a TemplatedView with a Collection Property and ItemTemplate Property.
  2. Create a ContentPage implementing Custom control and Add DataTemplate to it.
  3. Add ControlTemplate with ListView to Page.
  4. Add Elements to ListView.
  5. Create Button on ContentPage to control ItemTemplate of the Custom Control.
  6. In Custom Control, Add logic to get ListView from TemplatedChild and apply the ItemTemplate on Property change of ItemTemplate.

Expected: ListView ItemTemplate Changes to newly applied ItemTemplate on Windows, Android and iOS platforms.
Observed: ListView ItemTemplate Changes to newly applied ItemTemplate on Windows and Android but not on iOS.

Link to public reproduction project repository

https://github.com/prathameshnarkhede/mauiiositemtemplatebug.git

Version with bug

9.0.0-preview.7.24407.4

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@prathameshnarkhede prathameshnarkhede added the t/bug Something isn't working label Aug 28, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jaosnz-rep
Copy link

I can repro this issue at iOS platform on the latest 17.12.0 Preview 1.0(9.0.0-preview.7.24407.4 & 8.0.72).

@PureWeen
Copy link
Member

Does it work if you use CollectionView @prathameshnarkhede ?

@PureWeen PureWeen added this to the Backlog milestone Aug 29, 2024
@PureWeen PureWeen added the p/3 Work that is nice to have label Aug 29, 2024
@prathameshnarkhede
Copy link
Author

@PureWeen
I tried changing from ListView to CollectionView and that worked for me.
Thanks for suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-listview ListView and TableView p/3 Work that is nice to have platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants