Page 1 of 1

How to custom menu and add separate line beetween item

Posted: Thu Dec 16, 2021 9:29 am
by tmcuong

How to custom menu and add separate line between menuitem

item

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

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

Thanks


Re: How to custom menu and add separate line beetween item

Posted: Thu Dec 16, 2021 10:34 am
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.


Re: How to custom menu and add separate line beetween item

Posted: Thu Dec 16, 2021 10:43 am
by tmcuong

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


Re: How to custom menu and add separate line beetween item

Posted: Thu Dec 16, 2021 11:56 am
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'
                }
            }
        }
    }
});

Re: How to custom menu and add separate line beetween item

Posted: Wed Dec 29, 2021 1:31 pm
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 1433 times

Re: How to custom menu and add separate line beetween item

Posted: Wed Dec 29, 2021 1:40 pm
by mats

It should be

                cls         : 'b-separator',

Re: How to custom menu and add separate line beetween item

Posted: Wed Dec 29, 2021 1:54 pm
by tmcuong

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

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

How can I show separator between menuitem


Re: How to custom menu and add separate line beetween item

Posted: Wed Dec 29, 2021 5:49 pm
by mats

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


Re: How to custom menu and add separate line beetween item

Posted: Thu Dec 30, 2021 1:37 pm
by Animal

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