Anyone else's child throw tantrums in public??

I'm struggling with my 18 month atm as she has thrown a tantrum twice now when out in public. First time was at swimming, when it was time to go she just flops on the floor kicking and screaming! When I pick her up she starts clawing at me and pulling my hair out! It's so embarrassing! It happened again today at the doctors! In the waiting room with with loads of people staring at me! And then again in the doctors office! I'm gonna end up stop taking her anywhere if she keeps this up!