Selectize options display direction

Selectize options display direction

vkurimetivkurimeti Posts: 6Questions: 4Answers: 0

Hi Allan,

Is there any property that I can specify the direction of displaying the selectize options? "dropdownDirection" is not working. Bellow is the code for reference. Thanks in advance.

{
            label: "TEAM ASSIGNMENT (ATHLETE):",
            name: "tsa",
            type: "selectize",
            create: false,
            dropdownDirection:'auto',
            attr: {
                multiple: true,
                create: false,
                allowEmptyOption: true,
                options: [],
                dropdownDirection:'auto',
                load: function(query, callback) {
                    getAllTeams();
                }
           },
           opts: {
               valueField: 'tid',
               labelField: 'na',
               searchField: ['na'],
               sortField: 'na',
               dropdownDirection:'auto',
                render: {
                   item: function(item, escape) {
                       return '<div class="team-opts-dis"><div style="text-transform: uppercase;"><b>'+item.na+'</div></div>';
                     },
                     option: function(item, escape) {
                       return '<div class="team-opts-dis"><div style="text-transform: uppercase;"><b>'+item.na+'</div></div>';
                     }
                 }
           }
        }

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,819Questions: 1Answers: 10,517 Site admin
    Answer ✓

    As far as I am aware, that should be the correct way of doing it. Certainly the above will pass the dropdownDirection option into Selectize ( from the opts parameter).

    The bug for dropdownDirection in Selectize appears to still be open. Are you using a custom version that includes that?

    Allan

  • vkurimetivkurimeti Posts: 6Questions: 4Answers: 0

    Hi Allan,

    Thanks for your reply. I am not sure about the version. Could you please let me know the correct version that I need to use to get it working?

  • allanallan Posts: 63,819Questions: 1Answers: 10,517 Site admin

    I don't know the ins and outs of the Selectize versioning since that isn't my project, but my reading of the bug that I linked to, and the fact that it is still open, suggests that the dropdownDirection option hasn't been implemented in a release version of Selectize yet.

    You'd really need to check with the Selectize folks to see if that is the case or not though.

    Allan

This discussion has been closed.