My Onions have Bolted!

No, not you Usain!
Bolting is the production of a flowering stem (or stems) on agricultural and horticultural crops before the crop is harvested, in a natural attempt to produce seeds and reproduce. … Plants under stress may respond by bolting so that they can produce seeds before they die. Yes, even plants get stressed. Some of the causes of this can be:
Temperature High temperatures and too much direct sunlight dry the plant out quickly and stress it. The other important factor which affects many annuals is significant increases in day length. These extra light hours trigger the plant to run to seed as summer approaches if not monitored.
Cold Snaps Cold snaps in summer are frequent in Britain and can last a few days, then it immediately warms up again. If a cold spell is in the forecast, then be prepared with some protection such as covering with garden fleece or moving them inside a cold frame if they are still in pots. It will prove beneficial to bringing your plants to full harvest.
Poor Quality Soil There are so many nutrients in soil that help plants to grow. If the soil is dry on a regular basis, this can cause the quality of the soil to diminish and can eventually cause bolting. Building a compost can take time but can be key to healthy crops.
Waiting too Long to Harvest It is good to check the best time to harvest your vegetables as they all may be at different times. Onions can typically be left in the ground longer than necessary which will also cause bolting during a change of season.
As soon as you see an onion has flower buds, snip the buds to prevent the bulb from splitting, then harvest and eat those onions first; the sooner the better. Onions that have bolted don’t store well and is a problem for even the most seasoned or professional growers.
There are some vegetables which can still be eaten after bolting within a short period of time. Onions and garlic that have bolted are still edible and retain their taste. They should be cured, the leaves and flower stalk removed, and the bulb eaten within a couple of months. … Once the flower shoots form, not only is growth slowed as the plants put all their energy into reproducing, but they can rapidly become unusable in the kitchen as well.
Other crops that are susceptible to bolting include: lettuce, leeks, and broccoli do not sit as well on the menu. If the leek is eaten within a few days of bolting, it should be fine but the longer it is stored, the harder it gets and can quickly lose its taste. Kale, lettuce, and other leafy vegetables including spinach lose a bit of their texture and can begin to taste bitter.
Weather, by its very nature, is always unpredictable, especially now with global warming. Not all of us have the space or ability to have greenhouses or temperature-controlled gardens but there are still things we can do to keep our crops happy and healthy. Providing temporary cover for some crops grown in the open will reduce bolting and help with fluctuating temperatures. Keeping your crops well-watered and continuing to add nutrients to the soil can help them to full term. I have been learning a lot about composting lately; it takes time for our food waste to break down but can be a natural way to continue to feed new crops if you’re willing to put the time and effort in. Mixing it with soil and grass creating a good mulch will keep new plants happy into harvest and save money purchasing manufactured nutrients.