The best answer is: They had the choice of being U.S. or Mexican citizens.
The Treaty of Guadalupe Hidalgo, signed in 1848, ended the Mexican-American War and provided that former Mexican territories would become part of the United States. It also allowed Mexican residents in these territories (which included Texas) to choose between retaining their Mexican citizenship or becoming U.S. citizens.