almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.85k stars 1.48k forks source link

Select option list is not clickable in groups section #4293

Open khitsik opened 5 years ago

khitsik commented 5 years ago

Try to insert select option list into each group cell. It displays as a select element, but it does not expand by a click like the usual select does. It does not react on a click.

var options   = {
            groupOrder: function (a, b) {
                return a.value - b.value;
            },

            groupTemplate: function(group) {
                var container = document.createElement('div');
                var select    = document.createElement('select');

                groups.forEach(function (i) {
                    var option       = document.createElement('option');
                    option.innerHTML = i.content + ' ';
                    container.insertAdjacentElement('afterBegin',select);
                    select.insertAdjacentElement('afterBegin',option);
                });

                return container;
            },
            orientation: 'both',
            editable: {
                add: true,         // add new items by double tapping
                updateTime: true,  // drag items horizontally
                updateGroup: true, // drag items from one group to another
                remove: true,       // delete an item by tapping the delete button top right
                overrideItems: true  // allow these options to override item.editable
            },
            groupEditable: true,

            start: '2019-02-01',
            end: '2019-03-01',
        };

Expected result: Select expanded by a click and I can choose some option. Actual result: Nothing happens by a click.