selectedIndex attr transformation