sit-onyx 1.0.0-beta.331 → 1.0.0-beta.333

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.
@@ -7114,8 +7114,12 @@ const useSelection = (options) => createFeature((ctx) => {
7114
7114
  selectionState.value.contingent.delete(id);
7115
7115
  }
7116
7116
  };
7117
- const isIndeterminate = () => selectionState.value.contingent.size !== 0 && selectionState.value.contingent.size !== rowsCount.value;
7118
- const isChecked = () => selectionState.value.selectMode === "exclude" && selectionState.value.contingent.size !== rowsCount.value || selectionState.value.selectMode === "include" && selectionState.value.contingent.size === rowsCount.value;
7117
+ const isHeaderIndeterminate = () => selectionState.value.contingent.size !== 0 && selectionState.value.contingent.size !== rowsCount.value;
7118
+ const isHeaderChecked = () => {
7119
+ const { contingent, selectMode } = selectionState.value;
7120
+ if (selectMode === "exclude") return contingent.size === 0;
7121
+ return contingent.size > 0 && contingent.size === rowsCount.value;
7122
+ };
7119
7123
  const modifyColumns = {
7120
7124
  func: (cols) => {
7121
7125
  if (!isEnabled.value()) return [...cols];
@@ -7149,9 +7153,10 @@ const useSelection = (options) => createFeature((ctx) => {
7149
7153
  label: selectionState.value.selectMode === "include" ? ctx.i18n.t.value("dataGrid.head.selection.selectAll") : ctx.i18n.t.value("dataGrid.head.selection.deselectAll"),
7150
7154
  value: `selection-all-rows`,
7151
7155
  hideLabel: true,
7152
- indeterminate: isIndeterminate(),
7156
+ indeterminate: isHeaderIndeterminate(),
7157
+ disabled: rowsCount.value === 0,
7153
7158
  "onUpdate:modelValue": (checked) => updateSelectMode(checked),
7154
- modelValue: isChecked()
7159
+ modelValue: isHeaderChecked()
7155
7160
  })
7156
7161
  },
7157
7162
  cell: {