The widget will need to support selective refresh. https://make.wordpress.org/core/2016/03/22/implementing-selective-refresh-support-for-widgets/