JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums ComboBox comboBox.select() with multiple selection

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #102717
    Dark Beccio
    Participant
    Up
    0
    Down

    hi, i’m using a combobox with selection-mode = “checkbox”,

    when i call comboBox.selectedValues i get “1,2”,

    but when i use comboBox.select(comboBox.selectedValues),

    the items are not selected.

    How should i pass the values to comboBox.select() ?

    #102718
    admin
    Keymaster
    Up
    0
    Down

    Hi Dark Beccio,

    To select multiple values at once, the selectedValues or selectedIndexes properties should be used.

    Example:

    
        <smart-combo-box selected-values=["1","2"] selection-mode="checkBox">
            <smart-list-item value="1">Affogato</smart-list-item>
            <smart-list-item value="2">Americano</smart-list-item>
            <smart-list-item value="3">Bicerin</smart-list-item>
            <smart-list-item value="4">Breve</smart-list-item>
            <smart-list-item value="5">Cappuccino</smart-list-item>
            <smart-list-item value="6">Cafe Crema</smart-list-item>
            <smart-list-item value="7">Cafe Corretto</smart-list-item>
            <smart-list-item value="8">Cafe macchiato</smart-list-item>
            <smart-list-item value="9">Cafe mocha</smart-list-item>
            <smart-list-item value="10">Cortado</smart-list-item>
            <smart-list-item value="11">Cuban espresso</smart-list-item>
            <smart-list-item value="12">Espresso</smart-list-item>
            <smart-list-item value="13">Eiskaffee</smart-list-item>
            <smart-list-item value="14">Frappuccino</smart-list-item>
            <smart-list-item value="15">Galao</smart-list-item>
            <smart-list-item value="16">Greek frappe coffee</smart-list-item>
            <smart-list-item value="17">Iced Coffee´╗┐</smart-list-item>
            <smart-list-item value="18">Instant Coffee´╗┐</smart-list-item>
            <smart-list-item value="19">Latte</smart-list-item>
            <smart-list-item value="20">Liqueur coffee</smart-list-item>
        </smart-combo-box>

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.