SelectEditor with different options per row

I have a DataTable, and on one column I want to add a SelectEditor that has different dropdown options on each cell, according to the row number. Is this possible? I didn’t see any demonstration of this in google searches, only examples where the same options are applied to each cell in a TableColumn.
Thanks for any help!

I figured out one way to do this, by having CustomJS change SelectEditor.options, triggered on indices selected. So here is my code, that gives me different dropdown options on each row.

from bokeh.models import ColumnDataSource
from bokeh.models.widgets.tables import (
    DataTable, TableColumn, SelectEditor
from import curdoc
from bokeh.models import CustomJS

# sample data
table_data = {
	'x': ["1", "2", "3"]
default_options = [
# on every event, 
#   change the options according to the row number
full_options = [
    ["1", "2", "3"],
    ["4", "5", "6"], 
    ["7", "8", "9"]

source = ColumnDataSource(data=table_data)
# need a reference to the SelectEditor,
#   to change editor.options later
editor = SelectEditor(options=default_options)
columns = [
    TableColumn(field="x", title="x", editor=editor)
data_table = DataTable(

callback = CustomJS(args={"editor": editor, "full_options": full_options}, code="""
n = cb_obj.indices[0];
editor.options = full_options[n]
source.selected.js_on_change("indices", callback)


But this seems like not the right way to do this. Is there a better way to implement this feature? Are there any obvious shortcomings of this implementation?

@snerd7 The SelectEditor does not support that kind of usage. It’s intended purpose is for servicing columns that have a defined categorical types (i.e. the one set of options is valid for any/every row). For something like this the only option would be to create your own custom extension.