We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

error in chip

Thread ID:

Created:

Updated:

Platform:

Replies:

150963 Jan 26,2020 01:18 AM UTC Feb 3,2020 07:27 AM UTC Blazor 5
loading
Tags: Chips
ebi torabi
Asked On January 26, 2020 01:18 AM UTC

Hi.Please look at the attachment file.
@using Syncfusion.EJ2.Blazor.Inputs
@page "/"
<EjsNumericTextBox TValue="int" @bind-Value =@NumericValue></EjsNumericTextBox>
<CascadingValue Value="@NumericValue">
    <Chip></Chip>
</CascadingValue>
@code {

    public int NumericValue { get; set; } = 5;
}
------------------------------------------------------------------------------------------------------------------
<EjsChipList Selection="Selection.Single" EnableRtl="true">
    <ChipCollection>
        @if (dataSource > 0)
        {
            @for (int i = 0; i <= dataSource; i++)
            {

                <ChipListChip Text="@(i.ToString().PadLeft(2, '0'))">


                </ChipListChip>
            }

        }
    </ChipCollection>
</EjsChipList>
@code{
    [CascadingParameter]
    public int dataSource { get; set; }
}

Attachment: chipError_8e230b33.zip

Sowmiya Padmanaban [Syncfusion]
Replied On January 27, 2020 12:34 PM UTC

Hi Ebi,  

We have checked your reported query to adding more than two items dynamically. We are able to reproduce the issue from our end. We might consider this as a bug from our end. This bug fix will be included in our Volume 4 SP1 Release which is expected to be released at the end of January. Please be patience, until then. 
 
 
Please let us know, if you need any further assistance on this. 

Regards,  
Sowmiya.P 


ebi torabi
Replied On January 30, 2020 07:11 AM UTC

Hi Sowmiya.P.
Has this issue been fixed in version 17.4.46


Shameer Ali Baig Sulaiman Ali Baig [Syncfusion]
Replied On January 31, 2020 07:23 AM UTC

Hi Ebi, 
 
We are glad to announce that our Essential Studio 2019 Volume 4 Service Pack release v17.4.0.46 is rolled out and is available for download under the following link. 
 
  
In this release, we have included a fix for “Dynamically add more than one chip items to Chip component”. 
 
For your reference, we have prepared a simple sample. Refer the sample link below. 
 
  
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards, 
Shameer Ali Baig S. 


ebi torabi
Replied On February 1, 2020 06:42 AM UTC

Hi Shameer Ali Baig S.Thank you very much. 
But it is possible for all chips to be built dynamically.


That is, delete the following line
.
.
.
 <ChipListChip Text="text"></ChipListChip>
.
.
.

Shameer Ali Baig Sulaiman Ali Baig [Syncfusion]
Replied On February 3, 2020 07:27 AM UTC

Hi Ebi, 
 
Thanks for the update. 
 
For your information, if no chip collection is not added on initial rendering, then Chip component will render with a single chip item. It is the default behavior of the component. Thus, we cannot render empty Chip on initial rendering, to add the Chip list dynamically. 
 
Though, to achieve your expected requirement, you can initialize the Chip control without adding any text and add styles for empty chip (display as none) to hide the initially rendered empty Chip. Then, you can dynamically add the Chip items on user input. 
 
 
Refer the below code block. 
 
 
<EjsChipList @ref="chip" EnableDelete="true" CssClass="custom"> 
    <ChipCollection> 
        <ChipListChip></ChipListChip> 
    </ChipCollection> 
</EjsChipList> 
 
@code{ 
    EjsButton ToggleBtn; 
    EjsTextBox textbox; 
    EjsChipList chip; 
 
    public void onToggleClick() 
    { 
        var value = this.textbox.Value; 
        ChipModel chips = new ChipModel(); 
        chips.Text = value; 
        chip.Add(chips); 
    } 
 
} 
 
<style> 
    .e-chip-list .custom.e-chip:first-child { 
        display: none; 
    } 
</style> 
 
 
We have also prepared sample for your convenience.  
 
 
Please let us know, if you need any assistance. 
 
Regards, 
Shameer Ali Baig S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon