inovua / reactdatagrid

Empower Your Data with the best React Data Grid there is
https://reactdatagrid.io
Other
3.45k stars 57 forks source link

Removing options from Menu #359

Closed GastonMikro closed 1 year ago

GastonMikro commented 1 year ago

menu

I don't want all of the options in this menu. Can I remove some?

I tried this but it does not work:

const columnMenuProps = { items: (defaultItems) => defaultItems.filter( (item) => item.name !== "group" && item.name !== "ungroup" && item.name !== "lock-start" ), };

        <ReactDataGrid
            idProperty="id"
            columns={columns}
            dataSource={dataSource}
            style={gridStyle}
            pagination
            columnMenuProps={columnMenuProps}
        />