Hi! I’m attempting to simultaneously update the href and title of a html.A element by passing the element whole-cloth through a decorated function to a html.Div container. This method mostly works as expected, but with one major issue: the generated HTML component has a size of 0x0px. Manually passing style information with the component doesn’t appear to help.
Here’s what the container looks like:
html.Div(
[],
id='external-link',
className='five columns'
)
And here’s what the function call looks like:
@app.callback(
dash.dependencies.Output('external-link', 'children'),
[dash.dependencies.Input('selected-listing-cache', 'children')]
)
def generate_external_link(index_id, site_name):
output = html.A(
title='View this item on on ' + site_name
href= generate_url(index_id),
target= "_blank",
style={'height': '50', 'width': '50', 'font-size': '12'}
)
return output
And the output: