Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Form element custom rendering in Content Fragment Editor #63

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

@naydav naydav changed the title Custom fields feat: Form element custom rendering in Content Fragment Editor Nov 9, 2023
# Conflicts:
#	gatsby-config.js
#	src/pages/services/aem-cf-editor/api/custom-fields/index.md
#	src/pages/services/aem-cf-editor/api/index.md
|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| `getModel(): Object` | Return Content Fragment Model for the currently edited Content Fragment. |
| `getDefaultValue(): mixed` | Returns the initial value for the input we are replacing. |
| `getValidationState(): invalid|valid` | Returns the validation state value for the input we are replacing. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it string with two possible values or a boolean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


| Method | Description |
|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| `getModel(): Object` | Return Content Fragment Model for the currently edited Content Fragment. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we describe at least major fields of the object?

| `getModel(): Object` | Return Content Fragment Model for the currently edited Content Fragment. |
| `getDefaultValue(): mixed` | Returns the initial value for the input we are replacing. |
| `getValidationState(): invalid|valid` | Returns the validation state value for the input we are replacing. |
| `onValidationStateChange(Function callback): void` | Accepts a callback that will be called when the validation state changes for the input we are replacing. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a callback signature? Does it accept any arguments?

| `getDefaultValue(): mixed` | Returns the initial value for the input we are replacing. |
| `getValidationState(): invalid|valid` | Returns the validation state value for the input we are replacing. |
| `onValidationStateChange(Function callback): void` | Accepts a callback that will be called when the validation state changes for the input we are replacing. |
| `onChange(Function callback): void` | Accepts a callback that will be called when the value of the input we are replacing changes. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a callback signature? Does it accept any arguments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants