Preheat the oven to 200°C (fan 180°C) / Gas 6. Lightly oil a large baking sheet.
Heat the oil in a heavy-based saucepan, add the onions and sugar, and cook over a low heat until the onions are very soft and caramelised. Do not allow the onions to burn. This can be done up to 2 days ahead and kept chilled.
Spread a heaped tablespoon of the onions onto each flatbread. Arrange the figs on top. Crumble the feta over and scatter with the thyme.
Transfer to the baking tray and cook for 12–15 minutes or until the cheese is tinged golden. Serve straight away with a rocket salad on the side.