Skip to content

Commit

Permalink
FIX Avoid infinite recursive loop with attributes in schemadata
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Nov 19, 2024
1 parent 5074999 commit 871cfb8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions src/Forms/HistoryViewerField.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,21 +113,6 @@ public function getSchemaDataDefaults()
return $data;
}

/**
* When not used in a React form factory context, this adds the schema data to SilverStripe template
* rendered attributes lists
*
* @return array
*/
public function getAttributes()
{
$attributes = parent::getAttributes();

$attributes['data-schema'] = json_encode($this->getSchemaData());

return $attributes;
}

public function Type()
{
return 'history-viewer__container';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div $getAttributesHTML('name')>
<div $getAttributesHTML('name') $SchemaAttributesHtml>
<%-- Rendered using the HistoryViewer React component --%>
</div>

0 comments on commit 871cfb8

Please sign in to comment.