bfg-common 1.4.199 → 1.4.201

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -106,7 +106,13 @@ const updateSelectedRow = (): void => {
106
106
  selectedRow.value = []
107
107
 
108
108
  if (props.currentItems.length === 1) {
109
- selectedRow.value.push(props.currentItems[0])
109
+ selectedRow.value.push(0)
110
+ } else if (props.currentItems.length > 1) {
111
+ const totalIndex = props.currentItems.findIndex(
112
+ (item) => item.target_object.toLowerCase() === 'total'
113
+ )
114
+
115
+ totalIndex >= 0 && selectedRow.value.push(totalIndex)
110
116
  }
111
117
  }
112
118
  }
@@ -218,14 +224,14 @@ watch(
218
224
  if (props.type === 'vm') selectedNames = 'total'
219
225
  } else selectedNames = selectedItems.join(', ')
220
226
 
221
- if (props.type === 'vm' && ['network'].includes(props.chart)) {
222
- if (
223
- selectedItems.includes('total') ||
224
- (!selectedItems.includes('total') &&
225
- items.length === newValue.length + 1)
226
- )
227
- selectedNames = 'total'
228
- }
227
+ /* if (props.type === 'vm' && ['network'].includes(props.chart)) {
228
+ if (
229
+ selectedItems.includes('total') ||
230
+ (!selectedItems.includes('total') &&
231
+ items.length === newValue.length + 1)
232
+ )
233
+ selectedNames = 'total'
234
+ } */
229
235
 
230
236
  emits('select-objects', selectedNames)
231
237
  },