@coreui/vue-pro 4.1.2 → 4.1.3

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/dist/index.js CHANGED
@@ -9152,7 +9152,6 @@ const CSmartTable = vue.defineComponent({
9152
9152
  */
9153
9153
  columns: {
9154
9154
  type: Array,
9155
- default: () => [],
9156
9155
  required: false,
9157
9156
  },
9158
9157
  /**
@@ -9460,7 +9459,7 @@ const CSmartTable = vue.defineComponent({
9460
9459
  });
9461
9460
  // functions
9462
9461
  const isSortable = (i) => {
9463
- const isDataColumn = itemsDataColumns.value.includes(rawColumnNames[i]);
9462
+ const isDataColumn = itemsDataColumns.value.includes(rawColumnNames.value[i]);
9464
9463
  let column;
9465
9464
  if (props.columns)
9466
9465
  column = props.columns[i];
@@ -9558,16 +9557,16 @@ const CSmartTable = vue.defineComponent({
9558
9557
  sorterState.state = '';
9559
9558
  };
9560
9559
  // computed
9561
- const genCols = Object.keys(items.value[0] || {}).filter((el) => el.charAt(0) !== '_');
9562
- const rawColumnNames = props.columns
9560
+ const genCols = vue.computed(() => Object.keys(items.value[0] || {}).filter((el) => el.charAt(0) !== '_'));
9561
+ const rawColumnNames = vue.computed(() => props.columns
9563
9562
  ? props.columns.map((column) => {
9564
9563
  if (typeof column === 'object')
9565
9564
  return column.key;
9566
9565
  else
9567
9566
  return column;
9568
9567
  })
9569
- : genCols; //! || el
9570
- const itemsDataColumns = vue.computed(() => rawColumnNames.filter((name) => genCols.includes(name)));
9568
+ : genCols.value); //! || el
9569
+ const itemsDataColumns = vue.computed(() => rawColumnNames.value.filter((name) => genCols.value.includes(name)));
9571
9570
  // variables
9572
9571
  const columnFiltered = () => {
9573
9572
  let _items = items.value;
@@ -9673,7 +9672,7 @@ const CSmartTable = vue.defineComponent({
9673
9672
  ...props.tableHeadProps,
9674
9673
  columnFilter: props.columnFilter,
9675
9674
  columnFilterValue: columnFilterState.value,
9676
- columns: props.columns,
9675
+ columns: rawColumnNames.value,
9677
9676
  columnSorter: props.columnSorter,
9678
9677
  selectable: props.selectable,
9679
9678
  selectAll: selectedAll.value,
@@ -9720,12 +9719,12 @@ const CSmartTable = vue.defineComponent({
9720
9719
  currentItems: currentItems.value,
9721
9720
  firstItemOnActivePageIndex: firstItemOnActivePageIndex.value,
9722
9721
  noItemsLabel: props.noItemsLabel,
9723
- columns: props.columns,
9722
+ columns: rawColumnNames.value,
9724
9723
  scopedSlots: slots,
9725
9724
  selectable: props.selectable,
9726
9725
  onRowChecked: (id, value) => handleRowChecked(id, value),
9727
9726
  onRowClick: (item, index, columnName, event) => handleRowClick(item, index, columnName, event),
9728
- rawColumnNames: rawColumnNames,
9727
+ rawColumnNames: rawColumnNames.value,
9729
9728
  clickableRows: props.clickableRows,
9730
9729
  ...props.tableBodyProps,
9731
9730
  }),
@@ -9735,7 +9734,7 @@ const CSmartTable = vue.defineComponent({
9735
9734
  ...props.tableFootProps,
9736
9735
  columnFilter: false,
9737
9736
  columnSorter: false,
9738
- columns: props.columns,
9737
+ columns: rawColumnNames.value,
9739
9738
  selectable: props.selectable,
9740
9739
  selectAll: selectedAll.value,
9741
9740
  onFilterInput: (key, value) => columnFilterChange(key, value, 'input'),
@@ -9765,7 +9764,6 @@ const CSmartTable = vue.defineComponent({
9765
9764
  pages: numberOfPages.value,
9766
9765
  activePage: activePage.value,
9767
9766
  onActivePageChange: handleActivePageChange,
9768
- limit: itemsPerPage.value,
9769
9767
  })
9770
9768
  : ''),
9771
9769
  vue.h('div', {