Closed Sivakajan-tech closed 11 months ago
This is expected. Wave cannot know if you wish to use default links along with markdown cell type or not. However if you want to use both markdown and the default link behavior, you can go for something like this:
from h2o_wave import main, app, Q, ui
@app('/demo')
async def serve(q: Q):
if not q.args.table:
q.page['meta'] = ui.meta_card(box='')
q.page['example'] = ui.form_card(box='1 1 3 3', items=[
ui.table(
name='table',
columns=[
ui.table_column(name='name', label='Name',cell_type=ui.markdown_table_cell_type()),
ui.table_column(name='surname', label='Surname'),
],
rows=[
ui.table_row(name='row1', cells=['[John](?table)', 'Doe']),
ui.table_row(name='row2', cells=['[Alice](?table)', 'Smith']),
ui.table_row(name='row3', cells=['[Bob](?table)', 'Adams']),
]
)
])
else:
q.page["meta"].side_panel = ui.side_panel(
name="overview_panel",
title="Overview",
width="650px",
items=[],
events=["dismissed"],
closable=True,
blocking=True,
)
await q.page.save()
Wave SDK Version, OS
Wave SDK: 0.24.2 , OS: MacOs
Actual behaviour
When the
cell_type=ui.markdown_table_cell_type()
argument is added to the firstui.table_column()
, the column element itself will not be a hyperlink. I used the hyperlink to open the side-panel.cell_type=ui.markdown_table_cell_type()
argument can be use for many cases, I used this to apply the<pre>
tag to the element.Expected behavior
When the
cell_type=ui.markdown_table_cell_type()
argument is added to the firstui.table_column()
, the column element should be a hyperlink and should be raised the args element. (for @on() handler)Steps To Reproduce
https://github.com/h2oai/wave/assets/51718908/253492d6-c41c-4da0-825c-6cf3de2dc707
cc: @ShehanIshanka