diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js index 3ead46e634..c8a9ce6ee6 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js @@ -742,9 +742,12 @@ var androidOperationModule = function () { // only for app whitelisting and black listing if (operationCode == "APP-RESTRICTION" && key == "restrictedApplications") { + //remove elements before adding + $('[data-add-form-container="#restricted-applications-grid"]').empty(); + var i; for (i = 0; i < uiPayload.restrictedApplications.length; ++i) { - $("#restrictedapplication-list").append('' + + $('[data-add-form-container="#restricted-applications-grid"]').append('' + ''+ (i+1) +' ' + uiPayload.restrictedApplications[i].appName + ' ' + uiPayload.restrictedApplications[i].packageName + ''); }