As mentioned in the comments, what you saw was a function of Alex's suit. The Arrowverse wiki lists the abilities the suit possesses, the one in question being;
Magnets: The suit's gloves are magnetic, which allow Alex to pull her weapons towards her if disarmed. She has also used the magnets in the suit to make a magnetic shield to defend herself or to contain explosives.
The suit makes it's first appearance in the season 3 episode Trinity. The magnetic function is explained and demonstrated around the 1:45 mark here;