enisn / UraniumUI

Uranium is a Free & Open-Source UI Kit for MAUI.
Apache License 2.0
1.11k stars 131 forks source link

MultiplePickerField in TabView #677

Open eertaseertas opened 3 months ago

eertaseertas commented 3 months ago

When a MultiplePickerField is used in a TabView., Select some options in MultiplePickerField. Change the selected tab to another one. Then get back to the tab with MultiplePickerField . All Selected options dissappear on UI although the selected values are still in the ObservableCollection in viewmodel. And user even cannot make a new selection to display any selection on MultiplePickerField on UI . (ItemsSource and SelectedItems properties are binded to two different ObservableCollections on Viewmodel. )

This does not happen when SelectedItems property is not used as in the sample in UraniumUI documentation. But in this case it is not possible to get the user selection on Viewmodel to go ahead.

Thx in advance for any solution.

enisn commented 1 month ago

Can you provide a small code-block that reproduces this scenario?

noeanton commented 1 month ago

HI, is there a way to bind the MultiplePickerField to a list of objects and specify the Display Text property?

enisn commented 1 month ago

HI, is there a way to bind the MultiplePickerField to a list of objects and specify the Display Text property?

Oh, unfortunately there is no display binding support. But for now, you can override ToString() method of your class and return whatever you want to display.

noeanton commented 1 month ago

Hi, I was able to make it work, but seems I needed to install also the MAUI community toolkit dialogs... one thing though, I can't seem to have it be bound to my view Model, when I try to use the bound property, it's null. :(