Completed
Last Updated: 11 Dec 2023 16:06 by ADMIN
Release 6.5.0
Kevin
Created on: 29 Sep 2023 16:15
Category: UI for .NET MAUI
Type: Bug Report
0
RadComboBox doesn't render correctly after dynamically setting SelectedItems
After dynamically setting SelectedItems on a multi select RadComboBox, it renders out all the items instead of showing the collapsed tokens view.  I believe this is because RadComboBox.HideTokens is not getting called in this situation.
Attached Files:
8 comments
ADMIN
Didi
Posted on: 11 Dec 2023 16:06

Hello Kevin,

So in this public item, there are two reported behaviors:

1) The initially logged issue: RadComboBox doesn't render correctly after dynamically setting SelectedItems - the issue is fixed and the fix is included in Telerik MAUI 6.5.0 version

2) When the dropdown is closed, it doesn't collapse the tokens. 

I see there is a misunderstanding from our side on the secondly reported behavior. First I thought the issue is the initially reported behavior, then I tested the described case with the collapsible tokens and correct, the tokens are not collapsed when item is selected from the ComboBox control. 

I talked to the dev team about this behavior, and actually this is the correct behavior of the control. The old behavior wasn't the correct one. If you still need to Unfocus the control in order to collapse the tokens in the input field, you can call the Unfocus() method on ComboBox.SelectionChnaged.

Here is an example:

<VerticalStackLayout>
    <telerik:RadComboBox ItemsSource="{Binding Items}" x:Name="combo"
                    SelectionMode="Multiple" SelectionChanged="combo_SelectionChanged"
                    DisplayMemberPath="Name">
        <telerik:RadComboBox.BindingContext>
            <local:ViewModel/>
        </telerik:RadComboBox.BindingContext>
    </telerik:RadComboBox>
</VerticalStackLayout>

private void combo_SelectionChanged(object sender, ComboBoxSelectionChangedEventArgs e)
{
    var control = sender as RadComboBox;
    control.Unfocus();
}

I hope I was able to explain the case. 

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
Kevin
Posted on: 04 Dec 2023 18:36

Hi Didi,

 

The issue with this one is no longer pre-selected items.  It is now that the multi-select combo box dropdown does not collapse after selecting an item.  I provided a gif of the behavior I'm seeing on the previous comment.  The project you provided me has this same problem when I test on an Android pixel 5 api 33 emulator.

ADMIN
Didi
Posted on: 04 Dec 2023 11:11

Hello Kevin,

I tested the case in a project with .NET 8 official and no issues with the selected items. The project is tested on Android pixel 5 api 33 emulator. 

Image and project are attached. Download the app and test on your side. The version of Visual Studio I have is 17.8.0. Modify the app, so the issue can be reproduced and send it back to me for further research. Maybe I am missing something from the setup and versions you use. 

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
Kevin
Posted on: 27 Nov 2023 15:16

Hi Yana,

 

I just created a basic project with the following, and it doesn't work like the gif you provided:

 

I'm using all the newest versions, and I'm testing on an Android emulator.  I attached a gif of the behavior I'm seeing.

Attached Files:
ADMIN
Yana
Posted on: 22 Nov 2023 11:54

Hi Kevin,

I didn't manage to reproduce the described behavior - the dropdown is properly closed on my side, please take a look at the attached gif. Could you please send me more details on the setup you have?

Regards,
Yana
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
Attached Files:
Kevin
Posted on: 15 Nov 2023 15:25
I believe there was a regression in this update.  Now when the dropdown is closed, it doesn't collapse the tokens.  The only way to get them to collapse is by clicking on a different text box.
ADMIN
Yana
Posted on: 12 Oct 2023 13:18

Hello Kevin.

I confirm this is an issue in the ComboBox control and I've updated the status of this feedback item to "Unplanned".

As you follow the item, you will receive an email notification as soon as we update its status.

Regards,
Yana
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
ADMIN
Yana
Posted on: 06 Oct 2023 15:00

Hi Kevin,

Thank you for writing about the behavior of the ComboBox  - indeed the preselected items are initially all rendered as tokens in the input.  I'll research a little bit more this behavior and will write back with more details early next week. 

Regards,
Yana
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com