@mantine-vue/table 2.4.0 → 3.0.0

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.
package/esm/index.mjs CHANGED
@@ -632,7 +632,7 @@ var MVT_EditCellTextInput = defineComponent({
632
632
  label: modal ? def.header : void 0,
633
633
  name: cell.id,
634
634
  placeholder: !modal ? def.header : void 0,
635
- value: value.value,
635
+ modelValue: value.value,
636
636
  variant: table.options.editDisplayMode === "table" ? "unstyled" : "default",
637
637
  onClick: (e) => e.stopPropagation(),
638
638
  ref: setRef
@@ -641,30 +641,30 @@ var MVT_EditCellTextInput = defineComponent({
641
641
  ...common,
642
642
  searchable: true,
643
643
  ...selectProps,
644
- onChange: (newValue, option) => {
644
+ "onUpdate:modelValue": (newValue) => {
645
645
  value.value = newValue;
646
- selectProps.onChange?.(newValue, option);
647
646
  },
647
+ onChange: selectProps.onChange,
648
648
  onBlur: blur
649
649
  });
650
650
  if (def.editVariant === "multi-select") return h(MultiSelect, {
651
651
  ...common,
652
652
  searchable: true,
653
653
  ...selectProps,
654
- onChange: (newValue) => {
654
+ "onUpdate:modelValue": (newValue) => {
655
655
  value.value = newValue;
656
- selectProps.onChange?.(newValue);
657
656
  },
657
+ onChange: selectProps.onChange,
658
658
  onBlur: blur
659
659
  });
660
660
  return h(TextInput, {
661
661
  ...common,
662
- value: value.value ?? "",
662
+ modelValue: value.value ?? "",
663
663
  ...textProps,
664
- onChange: (event) => {
665
- value.value = typeof event === "string" ? event : event.target.value;
666
- textProps.onChange?.(event);
664
+ "onUpdate:modelValue": (nextValue) => {
665
+ value.value = nextValue;
667
666
  },
667
+ onChange: textProps.onChange,
668
668
  onBlur: blur,
669
669
  onKeydown: (event) => {
670
670
  textProps.onKeyDown?.(event);
@@ -1072,11 +1072,10 @@ var MVT_SelectCheckbox = defineComponent({
1072
1072
  size: state.density === "xs" ? "sm" : "md",
1073
1073
  ...checkboxProps,
1074
1074
  title: void 0,
1075
- onChange: (event) => {
1076
- event.stopPropagation();
1077
- if (event.shiftKey === void 0) event.shiftKey = lastShiftKey;
1078
- selection(event);
1079
- checkboxProps.onChange?.(event);
1075
+ onChange: (nextChecked) => {
1076
+ selection({ shiftKey: lastShiftKey }, nextChecked);
1077
+ checkboxProps.onChange?.(nextChecked);
1078
+ lastShiftKey = false;
1080
1079
  },
1081
1080
  onClick: (event) => {
1082
1081
  event.stopPropagation();
@@ -4088,9 +4087,9 @@ var MVT_FilterCheckbox = defineComponent({
4088
4087
  size: table.getState().density === "xs" ? "sm" : "md",
4089
4088
  ...checkboxProps,
4090
4089
  title: void 0,
4091
- onChange: (e) => {
4090
+ onChange: (checked) => {
4092
4091
  column.setFilterValue(value === void 0 ? "true" : value === "true" ? "false" : void 0);
4093
- checkboxProps.onChange?.(e);
4092
+ checkboxProps.onChange?.(checked);
4094
4093
  },
4095
4094
  onClick: (e) => {
4096
4095
  e.stopPropagation();