'How to have a field conditional in Strapi's admin panel?

I'd like to show a field/component conditionally, in the admin panel.

Example: Let's say we have a simple enum field called "Provider". If the admin chooses Provider A, I'd like to show an extra field asking for more information. If Provider B is chosen, nothing is shown.

How can that be achieved in Strapi v4.1.X?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source