TL;DR: No state that has allowed the people to vote for President and Vice President has ignored the popular vote in that state. There is a slight problem with electors who ignore the outcome of the popular vote in that state.
The modern practice1, which has been adopted by all 50 states and the District of Columbia, is to delegate the selection of electors to the various political parties2. For example, Texas law3 states that "the set of elector candidates that is elected is the one that corresponds to the candidates for president and vice-president receiving the most votes." Except for Maine and Nebraska, the party that wins the plurality of the votes in a state wins all of that state's electoral votes. Maine and Nebraska4 assign statewide electors and district-specific electors, selected by the party that won the state or the district.
In this modern practice, the parties uniformly require that the electors select by the party pledge to vote for the Presidential and Vice Presidential candidates should those candidates win the plurality of votes assigned by the winning party are pledged to vote for the Presidential and Vice Presidential candidates who had the plurality of votes in the state or in the district. This doesn't always happen. These so-called "faithless electors" have been a potential way to overturn an election. The Supreme Court recently5 unanimously upheld laws that remove or punish rogue Electoral College delegates who refuse to cast their votes for the presidential candidate they were pledged to support.
Before this modern practice, there was nothing in the Constitution that required states to hold an election for President or Vice President of the United States1. South Carolina was the last holdout to this modern practice, and it fell to pressure after the Civil War. South Carolina did not have the President or Vice President on the ballot before the Civil War. The South Carolina state legislature could not have disregarded the popular vote because the popular vote did not exist.
Footnotes and references
1 There's nothing in the Constitution that says when people vote for electors for the President and Vice President of the US. There's not even anything in the Constitution that says that the electors are chosen by popular vote. Congress passed a law in 1845 that made "the Tuesday next after the first Monday in the month of November" the nationwide date for federal elections, with a strong implication that the people should be allowed to vote for the electors for the President and Vice President.
2 See Summary: State Laws Regarding Presidential Electors regarding how each state selects its electors.
3 Texas Election Code, Title 11, Chapter 192
4 Maine and Nebraska allocate two statewide electors and one elector for each of the states Congressional districts. The statewide electors are those appointed by the party whose candidates for President and Vice President received the most votes statewide. The district-specific electors are those appointed by the party whose candidates for President and Vice President received the most votes in that district.
5 Chiafalo et al. v. Washington