Layout with multiple custom elements
Layout with multiple custom elements

I'm trying to set some custom inputs between the topstart and topend, using the layout method
I setup a custom div with a const toolbar, then I tried to render with layout
layout: {
topStart: {
pageLength: {
menu: [ 10, 25, 50, 100 ]
}
},
top: {
toolbar
},
topEnd: {
search: {
placeholder: 'Type search here'
}
}
}
It returns an error "Cannot read properties of undefined (reading 'apply')"
I also tried this, using the multiple elements array
layout: {
topStart:
[
pageLength,
toolbar
],
topEnd: {
search: {
placeholder: 'Type search here'
}
}
}
but again it returns an error "pageLength is not defined"
What is the right way to use layout having some custom elements rendered between topstart and topend?
Answers
You've used
pageLength
as a variable there (same withtoolbar
). It should be a string:I don't know if toolbar is meant to be a variable, or a plugin?
If you want something in between
topStart
andtopEnd
usetop
as an array. See this discussion from yesterday which was asking basically the same thing.Allan
Thanks @allan I missed the yesterday conversation
This forum has 75'000 discussions - missing one is easy to do
.
Allan