Skip to content

Commit

Permalink
Merge branch 'craft-4' of https://github.com/verbb/tablemaker into cr…
Browse files Browse the repository at this point in the history
…aft-5

# Conflicts:
#	CHANGELOG.md
#	composer.json
  • Loading branch information
engram-design committed Aug 16, 2024
2 parents 63f2a71 + 139c95e commit 3656b49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
### Fixed
- Fix an error in Craft 4.6.0 where dropdown column options weren’t saving correctly.

## 4.0.12 - 2024-08-12

### Changed
- Update English translations.

### Fixed
- Fix an error when initializing the field in some instances.

## 4.0.11 - 2024-04-29

### Changed
Expand Down
4 changes: 3 additions & 1 deletion src/fields/TableMakerField.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ public function validateTableData(ElementInterface $element): void
$row[$colId] = trim($row[$colId]);
}

if (!$this->_validateCellValue($col['type'], $row[$colId], $error)) {
$type = $col['type'] ?? null;

if ($type && !$this->_validateCellValue($type, $row[$colId], $error)) {
$element->addError($this->handle, $error);
}
}
Expand Down

0 comments on commit 3656b49

Please sign in to comment.