This is a migrated thread and some comments may be shown as answers.

Escaping brackets in MVVM data attributes

3 Answers 124 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 10 Oct 2017, 02:00 PM

I have a kendoDropDownList, and want the option label to be "[Please Select]", but the brackets are causing binding issues.  I was able to get the first bracket to appear by escaping it with "\[Please Select", but I can't get the 2nd one to escape.  I tried a one and two backslashes before "]".  What is the trick that I'm missing?  Thanks!

My full element markup:

<input id="OpportunityType" 
data-role="dropdownlist" 
data-auto-bind="false"
data-text-field="name"
data-value-field="opportunityTypeKey"
data-option-label="\[Please Select\]"
data-bind="value: selectedOpportunityType, source: opportunityTypes, events: { change: onOpportunityTypeChange }" />

 

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 12 Oct 2017, 01:46 PM
Hello Michael,

We will need more time to investigate the exact cause for this behavior. I will update you with more details as soon as possible.

As a workaround for the time being, you can use the approach from this Dojo example, where using a zero-width non-joiner seems to fix the behavior:
data-option-label="‌&zwnj;[ Select Product ]"

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Michael
Top achievements
Rank 1
answered on 12 Oct 2017, 01:50 PM
I'll bring that back to my team, and use it for now.  I monitor release notes, but if you end up fixing it in a future release, please post here if you happen to remember.  Thanks for the response!
0
Dimitar
Telerik team
answered on 16 Oct 2017, 11:08 AM
Hello Michael,

We have further investigated the issue and I have logged this as a bug in the Kendo UI MVVM. You can start tracking the progress that we make on it from this GitHub issue.

Also, as a small token of gratitude for helping us discover this bug, I have updated your Telerik points accordingly.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MVVM
Asked by
Michael
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Michael
Top achievements
Rank 1
Share this question
or