5
$("#responsible").tokenInput(
            [
                {id: 7, name: "a@gmail.com"},
                {id: 11, name: "b@gmail.com"},
                {id: 13, name: "c@gmail.com"},
                {id: 17, name: "d@gmail.com"},
                {id: 19, name: "e@yahoo.com"},
                {id: 23, name: "f@gmail.com"},
                {id: 29, name: "abc@gmail.com"},
                {id: 31, name: "ab@gmail.com"}
            ],{
                prePopulate: respArray,
                hintText: "Enter mailid",
                allowCustomEntry: true,
                theme : "facebook",
               noResultsText: "O noes",
                searchingText: "Searching...",
                minChars: 1,
                tokenLimit: 1,
                tokenValue: "name",
                preventDuplicates: true
            }
);
  1. カスタム エントリでトークン入力が機能しない。カーソルが入力から離れるとすぐに、テキストは入力から消えます。どうすればこの問題を解決できますか。
4

2 に答える 2

0

これを試して:

$("#responsible").tokenInput(
  [
  {id: 7, name: "a@gmail.com"},
  {id: 11, name: "b@gmail.com"},
  {id: 13, name: "c@gmail.com"},
  {id: 17, name: "d@gmail.com"},
  {id: 19, name: "e@yahoo.com"},
  {id: 23, name: "f@gmail.com"},
  {id: 29, name: "abc@gmail.com"},
  {id: 31, name: "ab@gmail.com"}
  ],{
   prePopulate: respArray,
   hintText: "Enter mailid",
   allowFreeTagging: true,
   theme : "facebook",
   noResultsText: "O noes",
   searchingText: "Searching...",
   minChars: 1,
   tokenLimit: 1,
   tokenValue: "name",
   preventDuplicates: true
 }
 );

開始時に allowFreeTagging: true を含めます。

于 2015-07-29T09:59:27.597 に答える