@sahanar17 wrote:
Hello All,
I am very new to dash. I am generating a dash html table and item in each row of a particular column is a link. When an item is clicked, I want a modal to open and display the contents of the selected item.
def Table(dataframe):
rows =
for i in range(len(dataframe)):
row =
for col in dataframe.columns:
value = dataframe.iloc[i][col]
# update this depending on which
# columns you want to show links for
# and what you want those links to be
if col == ‘id’:
cell = html.Td(html.A(href=value, children=value))
else:
cell = html.Td(children=value)
row.append(cell)
rows.append(html.Tr(row))
return html.Table(
# Header
[html.Tr([html.Th(col) for col in dataframe.columns])] +rows )
Depending on the ‘value’ , I want to display the contents of modal. How can I do this?
Posts: 1
Participants: 1