Skip to Content
0
Former Member
Mar 10, 2015 at 12:15 PM

Change string for UI without binding

20 Views

HI,

There is a way to change the secondary value (remove the first path) but bind the all path

for example in the sedonray value I have like following example

JS Bin - Collaborative JavaScript Debugging</title> <link rel="alternate" type="application/jso…

e.g. I've userid: "/c01/b2/u3/u44" so when you type de ,you got the userid: "/c01/b2/u3/u44" in the list of the auto complete.

I want just for display (in the list) to remove the first path like when user type de he will see in the list "b2/u3/u44" and not "/c01/b2/u3/u44"

(remove the /c01/) ,but when it selected under the hood to bind the full path which is "/c01/b2/u3/u44" ,

there is a way to do it ?

I know how to get the string after change with the following code

var result = '/' + value.split('/').slice(2).join('/');


this will return from the full path "/c01/b2/u3/u44" the follwoing

"/b2/u3/u44"