Skip to content

Commit

Permalink
refactor(chat): Get rid of ContentReady, step 2
Browse files Browse the repository at this point in the history
  • Loading branch information
marker dao ® committed Jul 17, 2024
1 parent 9b77198 commit cc5f1d0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
9 changes: 0 additions & 9 deletions packages/devextreme-angular/src/ui/chat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,6 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges
this._setOption('width', value);
}

/**
* [descr:WidgetOptions.onContentReady]
*/
@Output() onContentReady: EventEmitter<any>;

/**
* [descr:dxChatOptions.onDisposing]
Expand Down Expand Up @@ -284,7 +276,6 @@ export class DxChatComponent extends DxComponent implements OnDestroy, OnChanges
super(elementRef, ngZone, templateHost, _watcherHelper, transferState, platformId);

this._createEventEmitters([
{ subscribe: 'contentReady', emit: 'onContentReady' },
{ subscribe: 'disposing', emit: 'onDisposing' },
{ subscribe: 'initialized', emit: 'onInitialized' },
{ subscribe: 'messageSend', emit: 'onMessageSend' },
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme-react/src/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Chat = memo(
), [baseRef.current]);

const subscribableOptions = useMemo(() => (["items"]), []);
const independentEvents = useMemo(() => (["onContentReady","onDisposing","onInitialized","onMessageSend"]), []);
const independentEvents = useMemo(() => (["onDisposing","onInitialized","onMessageSend"]), []);

const defaults = useMemo(() => ({
defaultItems: "items",
Expand Down
3 changes: 0 additions & 3 deletions packages/devextreme-vue/src/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ type AccessibleOptions = Pick<Properties,
"height" |
"hoverStateEnabled" |
"items" |
"onContentReady" |
"onDisposing" |
"onInitialized" |
"onMessageSend" |
Expand All @@ -28,7 +27,6 @@ const DxChat = createComponent({
height: [Function, Number, String],
hoverStateEnabled: Boolean,
items: Array,
onContentReady: Function,
onDisposing: Function,
onInitialized: Function,
onMessageSend: Function,
Expand All @@ -45,7 +43,6 @@ const DxChat = createComponent({
"update:height": null,
"update:hoverStateEnabled": null,
"update:items": null,
"update:onContentReady": null,
"update:onDisposing": null,
"update:onInitialized": null,
"update:onMessageSend": null,
Expand Down
5 changes: 5 additions & 0 deletions packages/devextreme/js/ui/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export default Chat;
* @hidden
*/

/**
* @name dxChatOptions.onContentReady
* @hidden
*/

/**
* @name dxChatOptions.tabIndex
* @hidden
Expand Down

0 comments on commit cc5f1d0

Please sign in to comment.