+ :style="{minWidth: calculateMinActionsWidth(row)}">
@@ -154,6 +154,22 @@ Vue.component('tt-table-crud', {
}
this.$set(this, 'crudModalColumnVisibility', crudModalColumnVisibility)
+ },
+ calculateMinActionsWidth(row) {
+ // Base width for the edit action
+ let minWidth = 19;
+
+ // Check additional actions
+ if (this.crudConfig && this.crudConfig.additionalActions) {
+ this.crudConfig.additionalActions.forEach(action => {
+ // Add width if action is visible (no condition or condition is true)
+ if (!action.condition || action.condition(row)) {
+ minWidth += 19;
+ }
+ });
+ }
+
+ return `${minWidth}px`;
}
}, computed: {
tableConfig() {