SearchBuilder inside editor modal in an input field of type "datatable"
SearchBuilder inside editor modal in an input field of type "datatable"
Emado
Posts: 3Questions: 1Answers: 0
Hello everyone,
How can I search inside the datatable inside my modal (the input field with type datatable)?
const editor = new DataTable.Editor({
ajax: '/data-tables/stock-check',
fields: [
{
label: 'Name:',
name: 'stock_check_list.name'
},
{
label: 'Items:',
name: 'items_data[].ItemId',
type: 'datatable',
multiple: true,
optionsPair: {
value: 'ItemId'
},
config: {
columns: [
{
title: 'ItemId',
data: 'ItemId'
},
{
title: 'Description',
data: 'Description'
},
{
title: 'InventoryLocation',
data: 'InventoryLocation'
},
{
title: 'InventoryBalance',
data: 'InventoryBalance'
},
{
title: 'LatestInventoryDate',
data: 'LatestInventoryDate'
},
{
title: 'TotalValue',
data: "null",
render: (data, type, row) => {
return row.InternalOrderPrice * row.InventoryBalance
}
},
]
}
}
],
table: tableElement
});
Answers
I've never tried it, the default global search has been enough for the majority of the use cases I've seen, but you could specify a
layout
object in yourconfig
object:For example. You might need to customise it to suit your needs.
Allan
Thank you for your fast reply.
But it didn't work
Update:
The dom option worked.
dom: 'Qftip',