$A.createComponents() with lightning:buttonMenu and lightning:menuItem

Having some problems dynamically creating a lightning:buttonMenu using $A.createComponents(). Creating the buttonMenu works fine but as soon as I try to add a lightning:menuItem I get the following when I click the menu:


Uncaught Assertion Failed!: Descriptor for Config required for registration : undefined  throws at ...

helper method from component:

createFilterMenu: function(cmp) {
    var options = cmp.get('v.filterOptions')
    var menuOptions = [
            'lightning:buttonMenu', {
                'aura:id': 'filterMenu',
                'iconName': 'utility:filterList',
                'alternativeText': 'Filter Selection',
                'value': cmp.getReference('v.filter'),
                'onselect': cmp.getReference('c.filterChange')
                'label': 'test',
                'value': 'test'
        function(components, status, errorMessage) {
            if (status === 'SUCCESS') {
                var menuDiv = cmp.find('menu')
                var menu = components[0]
                var item = components[1]
                menuDiv.set('v.body', menu)
            } else if (status === 'INCOMPLETE') {
                console.log('No response from server or client is offline.')
            } else if (status === 'ERROR') {
                console.log('Error: ' + errorMessage)

lighting:buttonMenu dropdown inside table not being displayed

I’m making a custom table with a lightning:buttonMenu inside one of it’s rows but when I click on the button the dropdown stays invisible because it doesn’t go over the z-index of the table I guess
This is my code so far:

Any idea on how to fix this?
Thanks in advance!