diff --git a/packages/frontend/src/pages/admin/RolesEditorFormula.vue b/packages/frontend/src/pages/admin/RolesEditorFormula.vue
index 76ba639277..1cce5e58e8 100644
--- a/packages/frontend/src/pages/admin/RolesEditorFormula.vue
+++ b/packages/frontend/src/pages/admin/RolesEditorFormula.vue
@@ -13,6 +13,9 @@
+
@@ -20,7 +23,7 @@
- valuesItemUpdated(updated)"/>
+ valuesItemUpdated(updated)" @remove="removeItem(element)"/>
@@ -55,6 +58,7 @@ const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.d
const emit = defineEmits<{
(ev: 'update:modelValue', value: any): void;
+ (ev: 'remove'): void;
}>();
const props = defineProps<{
@@ -93,6 +97,14 @@ function valuesItemUpdated(item) {
const i = v.value.values.findIndex(_item => _item.id === item.id);
v.value.values[i] = item;
}
+
+function removeItem(item) {
+ v.value.values = v.value.values.filter(_item => _item.id !== item.id);
+}
+
+function removeSelf() {
+ emit('remove');
+}