react-table-edit 1.4.30 → 1.4.32

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.mjs CHANGED
@@ -43236,7 +43236,7 @@ const TableEdit = forwardRef((props, ref) => {
43236
43236
  const [datePart, timePart] = stringData.split(' ');
43237
43237
  const [day, month, year] = datePart.split('/');
43238
43238
  const [hour, minute] = timePart.split(':');
43239
- const date = new Date(year, month - 1, day, hour, minute);
43239
+ const date = new Date(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute));
43240
43240
  if (!isNaN(date.getTime())) {
43241
43241
  if (column.onPaste) {
43242
43242
  dataRow[column.field] = column.onPaste(dataRow, date);
@@ -43253,7 +43253,7 @@ const TableEdit = forwardRef((props, ref) => {
43253
43253
  }
43254
43254
  }
43255
43255
  else if (column.type === 'numeric') {
43256
- const number = Number(stringData);
43256
+ const number = Number(stringData.replaceAll(formatSetting?.thousandSeparator ?? '.', '').replaceAll(formatSetting?.decimalSeparator ?? ',', '.'));
43257
43257
  if (!isNaN(number)) {
43258
43258
  if (column.onPaste) {
43259
43259
  dataRow[column.field] = column.onPaste(dataRow, number);
@@ -65488,7 +65488,7 @@ const HeaderTableCol = (props) => {
65488
65488
  const headerRef = useRef(null);
65489
65489
  const order = orderBy.find((item) => item.key === col.field);
65490
65490
  const [openFilter, setOpenFilter] = useState(false);
65491
- const filter = filterBy.find((item) => item.key === col.field);
65491
+ const filter = filterBy.find((item) => item.key === (col.fieldFilter ?? col.field));
65492
65492
  const handleResize = (e, { size }) => {
65493
65493
  // Update the column width here
65494
65494
  // You might need to update the state or call a callback to update the width