summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/views/Settings/Network/TableIpv4.vue11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/views/Settings/Network/TableIpv4.vue b/src/views/Settings/Network/TableIpv4.vue
index 51f27f8c..8f10d625 100644
--- a/src/views/Settings/Network/TableIpv4.vue
+++ b/src/views/Settings/Network/TableIpv4.vue
@@ -45,7 +45,7 @@
>
<template #cell(actions)="{ item, index }">
<table-row-action
- v-for="(action, actionIndex) in item.actions"
+ v-for="(action, actionIndex) in filteredActions(item)"
:key="actionIndex"
:value="action.value"
:title="action.title"
@@ -139,6 +139,15 @@ export default {
return newValue;
},
},
+ filteredActions() {
+ return (item) => {
+ if (item.AddressOrigin === 'DHCP') {
+ return item.actions.filter((action) => action.value !== 'delete');
+ } else {
+ return item.actions;
+ }
+ };
+ },
},
watch: {
// Watch for change in tab index