var selected = component.get("v.key"); //key used for storing tab ids. component.find("tabs").set("v.selectedTabId",selected);