Vizro: calling card href property from custom action

Hi there!
I am creating Vizro dashboard and one of the pages require “custom action”.
The action requests values from users and displays card.

question: how do I pass “href” card property when displaying https link? And ignore it when it is text? I am able to get the result now however it comes has https link and open in the dashboard itself instead of another window.

here the code:
custom_action_select_creative = vm.Action(
function=custom_action_to_select_creative(),
inputs=[“etc.value”],
outputs=[“creative_content.children”]
)
vm.Dropdown(title=‘ver no.’, id=“etc”, options=[“”], multi=False,
actions=[
custom_action_select_creative
]),
vm.Card(id=‘creative_content’,
text=“”"
#### content.
“”“,
href=”"
),

I am facing same issue when trying to return a data grid see the code below -

custom_action_detail_grid = vm.Action(
function=custom_action_details_df(),
inputs=[“details_event_select.value”, “details_datepicker.value”],
outputs=[“event_details.children”]
)

Hello @sumitmehta12 and welcome to the community! I see you raised the same question on out Github issues and got an answer there, so let’s continue the conversation there :slight_smile: Vizro: passing dynamic inputs to components based on user inputs: vm.AgGrid and vm.Card · Issue #589 · mckinsey/vizro · GitHub

2 Likes