Tabs component and links

Can anyone tell me if there is a way to click on a tab in the tabs navigation and have it go directly to a date in a table cell on the same page?

Hey @tomm!

You can try controlling your table component with an event handler on the tabs navigation component:

Could that be what you're looking for? I'm curious what logic determines which row is selected based on the tab.

Hey @Kabirdas Henry,

The tabs are the different shipping dates found in the data. I wanted it to work where clicking on an date (tab), took you to the first row in the table with that date. I hope that makes sense.

Yea definitely! You might try something like {{yourTable.data.findIndex(row => row.shippingDate === self.value)}}.

Can you let me know if that works?

I typed in the following: {{ table3.data.findIndex(row => row.shipping_date === self.value) }} and I get an error message that says "table3.data.findIndex is not a function".

@tomm can you try table3.data.shipping_date.indexOf(self.value) instead? My guess is that your table's data is an object of arrays instead of an array of objects, so I'd imagine formatDataAsArray(table3.data).findIndex(row => row.shipping_date === self.value) might work as well.

@Kabirdas, that worked. Thanks a lot for the assistance.