Conditional Card

I am trying to conditionally display data (record details) based on the record selected in a data table, without leaving the page. I have a data table with a link element that will take the user to the correct details page, however, I would like this to occur on the same page - where, if a record is selected a card will be displayed showing the details of that record.

I came across this post [Conditional display of text - #4 by vishsahu] while searching, and while the use case is similar, it doesn’t quite solve my problem. I have included a quick sketch to show the desired format showing when a ‘view’ is toggled, a card is displayed showing further details of that record.

Any variation of this design for the sake of simplicity or ease of implementation is welcome - its simply the ability to dynamically display data from the data table’s selected item in a card that is desired; if it makes it easier for the card to always be displayed, it is acceptable.

Thank you for any direction you can provide.

1 Like

Hi @Yuvraj,

Displaying the data on the same page will not be possible. Only option as of now is to display the details in a Modal Popup.

This way your data remains on the same page, but on click of each row, the details will get displayed on the modal popup.

Let me know if that works for you.

Thanks.

1 Like

I was thinking maybe the accordion class could be leveraged to accomplish this if it were contained within a data group, I haven’t got around to trying it, do you know if that could work?

If not, I will try to implement this using html snippet & javascript, unless there are limitations that would prevent this from working.

As always, thank you for all of the help & information you provide!

1 Like

Hi @Yuvraj,

I am not sure if putting accordian in the Data group will work but you can try that, its looks like a good approach :smiley:

Yes, custom Javascript will work seamlessly, that is always an option and you can build without limitations.

We have this feature in roadmap to show/hide details on the same page but not in the immediate priority.

Thanks.

1 Like

Thank you for providing the reassurance I needed to give this a shot - Im going to begin working on this now. If I’m able to successfully accomplish this, I’ll post the solution here.

1 Like

Sounds good.

Thanks :slight_smile: