Html.A in a datatable

Hi everyone !

I am working on a dash app and I use a dataframe.
I would like to add a column “URL” to that dataframe, each link would be customized for each row.
I would like to implement something like this :

list_url = []
names = tab['Name'].tolist()
for k in range (len(tab)):
    list_url.append(html.A("Link {}".format(names[k]), href="{}".format(names[k]))) 
tab['URL'] = list_url

Is it possible to put a html.A component into a datatable ?
Is there a better way to do it ?

Thank you in advance for your help !! :slight_smile:

You may consider this
https://dash-bootstrap-components.opensource.faculty.ai/docs/components/table/
or

presentation ( a value equal to: ‘input’, ‘dropdown’ or :point_right:‘markdown’ :point_left:; optional): The presentation to use to display data. Markdown can be used on columns with type ‘text’. See ‘dropdown’ for more info. Defaults to ‘input’ for [‘datetime’, ‘numeric’, ‘text’, ‘any’].

1 Like

Thank you for your answer !

Actually I need my datatable to remain a dash_table.DataTable element as I need to use some features as selected_rows for my callbacks… Which is not possible if it is a dbc.Table element…

Do you see a solution ?

Thank you in advance !

markdown