The F-35 is better and cheaper than Gripen or Rafale. Everyone who can buy F-35 is doing so. There were countries that switched when allowed to buy F-35.
The Gripen's problem is that it is expensive for a light fighter. The other problem is that uses an American engine and US can control export. There aren't many countries that can't buy F-35 but can buy Gripen. Brazil is the big one.
The French Rafale is having more success because it isn't export limited. It is better than Gripen and same price.