tail.select - Tail select settings not working when the component is created - Stack Overflow

I'm trying to use tail.select in my project and while the select is being rendered, none of the op

I'm trying to use tail.select in my project and while the select is being rendered, none of the options works (except strings). For example, cannot disable search as below:

  document.addEventListener("DOMContentLoaded", function(){

    tail.select("#owner-select",
    {
      search: false,
    });

  });

Any ideas why the initialized select still has search enabled?

I'm trying to use tail.select in my project and while the select is being rendered, none of the options works (except strings). For example, cannot disable search as below:

  document.addEventListener("DOMContentLoaded", function(){

    tail.select("#owner-select",
    {
      search: false,
    });

  });

Any ideas why the initialized select still has search enabled?

Share asked Mar 7 at 18:17 twktwk 3,1202 gold badges28 silver badges36 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Found it! The wiki is outdated (from 2021) and the options I was looking for were to be found in source code:

        const defaultOptions = {
            multiTags: false,
            multiCounter: true,
            multiLimit: Infinity,
            minSelectionLimit: 0,
            theme: 'light', // light|dark
            classNames: 'tail-default',
            buttonAll: true,
            buttonNone: true,
            buttonClose: false,
            buttonCloseText: '✕',
            strings: {
                all: "All",
                none: "None",
                placeholder: "Select an option...",
                search: "Type in to search...",
                limitExceded: "You can only select {0} option(s)!",
                minimumReached: "You need to select at least {0} option(s)!",
            }
 

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744913826a4600711.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信