[MGNLFE-38] Code example in react-editor README is incorrect Created: 23/Apr/20 Updated: 28/Apr/20 Resolved: 28/Apr/20 |
|
| Status: | Closed |
| Project: | Magnolia Frontend Helpers |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Robert Šiška |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Epic Link: | SPA Editor | ||||||||
| Sprint: | HL & LD 1 | ||||||||
| Story Points: | 0.5 | ||||||||
| Description |
|
In https://git.magnolia-cms.com/projects/MODULES/repos/frontend-helpers/browse/packages/react-editor This is used: const pageConfig = {templateDefinitions: templateDefinitions, componentMappings: COMPONENTS_MAPPING} return( <EditablePage content={content} config={pageConfig} /> ); But the approach to put templateDefinitions into the config object was in the end not included, templateDefinitions should not be in the pageConfig, it should just be included as a prop directly in `< EditablePage .......... />`. This README sample should be updated in order to avoid confusion and errors. const pageConfig = {componentMappings: COMPONENTS_MAPPING} return( <EditablePage content={content} config={pageConfig} templateDefinitions={templateDefinitions} /> ); |