@ai-table/grid 0.5.4 → 0.5.5

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.
@@ -7566,8 +7566,9 @@ class AITableFieldHead {
7566
7566
  }, ...(ngDevMode ? [{ debugName: "groupConfig" }] : []));
7567
7567
  this.bgConfig = computed(() => {
7568
7568
  const { field, width, height, stroke, isSelected, iconVisible, isFirstHead, showExpandIcon } = this.config();
7569
- const bgWidth = isFirstHead && showExpandIcon ? width + AI_TABLE_ROW_HEAD_EXPAND_WIDTH : width;
7570
- const bgX = isFirstHead && showExpandIcon ? AI_TABLE_OFFSET - AI_TABLE_ROW_HEAD_EXPAND_WIDTH : AI_TABLE_OFFSET;
7569
+ const shouldExtendLeft = isFirstHead && showExpandIcon && !isSelected;
7570
+ const bgWidth = shouldExtendLeft ? width + AI_TABLE_ROW_HEAD_EXPAND_WIDTH : width;
7571
+ const bgX = shouldExtendLeft ? AI_TABLE_OFFSET - AI_TABLE_ROW_HEAD_EXPAND_WIDTH : AI_TABLE_OFFSET;
7571
7572
  return {
7572
7573
  x: bgX,
7573
7574
  y: AI_TABLE_OFFSET,
@@ -14801,7 +14802,7 @@ class AITableGrid extends AITableGridBase {
14801
14802
  if (!focused) {
14802
14803
  return true;
14803
14804
  }
14804
- const hasAITableGrid = focused.closest('ai-table-grid') !== null || focused.closest('.ai-table-prevent-clear-selection') !== null;
14805
+ const hasAITableGrid = focused.querySelector('ai-table-grid') !== null || focused.closest('.ai-table-prevent-clear-selection') !== null;
14805
14806
  if (!hasAITableGrid) {
14806
14807
  return true;
14807
14808
  }