Our flexible Kanban board for managing tasks with drag drop


Post by tmcuong »

How to custom menu and add separate line between menuitem

item

menu.png
menu.png (13.55 KiB) Viewed 1466 times

I want to remove menuitem "Change column" and rename caption EditTask menuitem and add separate line between menuitem.

Thanks


Post by mats »

To add a border below a menu item, you can set the item´s https://bryntum.com/docs/scheduler/api/Core/widget/MenuItem#config-cls to b-separator.


Post by tmcuong »

How to remove "change column" menuitem and change caption "edit Task" menuutem


Post by alex.l »

Please have a look at feature docs: https://bryntum.com/docs/taskboard/api/TaskBoard/feature/TaskMenu
There is the list of default items: https://bryntum.com/docs/taskboard/api/TaskBoard/feature/TaskMenu#default-items
And example here: https://bryntum.com/examples/taskboard/task-menu/

So you need something like:

const taskBoard = new TaskBoard({
    features : {
        taskMenu : {
            items : {
                column : null,
                editTask : {
                    text : 'Change edit task name'
                }
            }
        }
    }
});

All the best,
Alex


Post by tmcuong »

I set seperate line with your guide

 cls : {
                'b-separate'     : 1,
                // [this.extraCls]  : 1,
                // [this.activeCls] : this.isActive
            },

It show b-separate item with height in red color. How can I set it has height with 1px only and has line border color.

menu.png
menu.png (1.51 KiB) Viewed 1384 times

Post by mats »

It should be

                cls         : 'b-separator',

Post by tmcuong »

It do not show separator instead It show item with text "separator" as picture

menu1.png
menu1.png (853 Bytes) Viewed 1382 times

How can I show separator between menuitem


Post by mats »

Can you please share a full test case with all your code so we can run it?


Post by Animal »

Add the class b-separator to the existing item that you want to see a separator before.


Post Reply