Get and modify selected state
a