These video clips of Mimosa pudica show the interesting mechanism termed seismonasty,
the movment of leaves and leaf parts due to a mechanical stimulus.
If the leaves are tapped or bumped, the leaflets along a rachilla will fold together.
The stimulus for this reponse travels in a linear direction from the point of mechanical stimulus.
Studies have shown that the phloem tissue functions in transmitting this stimulus, analogous to a neuron in animals.
Note that, in the second clip, heat from a lighter brings about the same response.
In this case, the base of the petiole eventually collapses. (Voice is Mr. Bob Mangen, SDSU greenhouse.)

What could be the adaptive significance of this? Seismonasty may protect the delicate leaves from mechanical damage
as an animal passes by and brushes against the plant. This response may also help protect from herbivory, by shielding the
leaflets and making them less accessible to an herbivore.