'Can Tabulator autocomplete be set up per cell? Not column?
I need to have have two autocompletes in my Tabulator definition. A user will select an employee - first autocomplete - then when he moves to select a contract - second column the autocomplete must be linked to the value selected in the first column.
To my knowledge Tabulator does not have such feature. So I was thinking that upon clicking the "contract" cell that column definition - autocomplete definition - would be updated. I cannot make it work because the function updateDefinition is buggy. It creates new column instead of updating its definition.
Working jsFiddle
table.on("cellEditing", function(cell){
//e - the click event object
//cell - cell component
updateTitle(cell)
})
table.on("cellClick", function(e, cell){
updateTitle(cell)
})
function updateTitle(cell){
var field = cell.getField()
if (field == "contract" || field =="id"){
var column = cell.getColumn()
var name = cell.getRow().getData().name
console.log(field)
console.log(name)
column.updateDefinition({title:"Updated Title"})
}
}
I am using MaterializeCSS and its autocomplete but I do not know how to use it inside Tabulator. And if it is actually a good idea.
Could you please suggest the best solution?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

