Compare commits
1 Commits
v1.0.0
...
d4bc6f8562
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4bc6f8562 |
@@ -50,10 +50,13 @@ class VendorMapping extends AbstractFieldArray
|
|||||||
$result = [];
|
$result = [];
|
||||||
/** @var DataObject $row */
|
/** @var DataObject $row */
|
||||||
foreach (parent::getArrayRows() as $key => $row) {
|
foreach (parent::getArrayRows() as $key => $row) {
|
||||||
// Ensure row IDs are prefixed with a non-numeric character
|
// Ensure row IDs are prefixed with underscore to make valid CSS selectors
|
||||||
|
// CSS IDs cannot start with a number
|
||||||
if (is_numeric($key)) {
|
if (is_numeric($key)) {
|
||||||
$key = 'row_' . $key;
|
$key = '_' . $key;
|
||||||
}
|
}
|
||||||
|
// Also set the _id property in the row data for proper rendering
|
||||||
|
$row->setData('_id', $key);
|
||||||
$result[$key] = $row;
|
$result[$key] = $row;
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
Reference in New Issue
Block a user