Skip to content

Commit

Permalink
Set eventemitter to undefined to allow actions to function correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dexster committed Sep 1, 2021
1 parent 7763757 commit a2d0754
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Public value.",
},
"onClick": Object {
"action": "onClick",
"defaultValue": "new EventEmitter<Event>()",
"defaultValue": undefined,
"description": "

Handler to be called when the button is clicked by a user.
Expand All @@ -241,7 +241,7 @@ Will also block the emission of the event if \`isDisabled\` is true.
"table": Object {
"category": "outputs",
"defaultValue": Object {
"summary": "new EventEmitter<Event>()",
"summary": undefined,
},
"type": Object {
"required": true,
Expand Down
4 changes: 3 additions & 1 deletion addons/docs/src/frameworks/angular/compodoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,14 @@ const castDefaultValue = (property: Property, defaultValue: any) => {

// All these checks are necessary as compodoc does not always set the type ie. @HostBinding have empty types.
// null and undefined also have 'any' type
if (['boolean', 'number', 'string'].includes(compodocType)) {
if (['boolean', 'number', 'string', 'EventEmitter'].includes(compodocType)) {
switch (compodocType) {
case 'boolean':
return defaultValue === 'true';
case 'number':
return Number(defaultValue);
case 'EventEmitter':
return undefined;
default:
return defaultValue;
}
Expand Down

0 comments on commit a2d0754

Please sign in to comment.