refact(filter/modal): refactor the handling of filter modal dialog

related to CAM-2896