File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed
Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,10 @@ export default class IgcChatInputComponent extends LitElement {
327327 protected override render ( ) {
328328 return html `
329329 < div part ="input-container " class ="${ this . dragClass } ">
330- ${ this . renderAttachmentsArea ( ) }
330+ ${ this . _chatState ?. inputAttachments &&
331+ this . _chatState ?. inputAttachments . length > 0
332+ ? this . renderAttachmentsArea ( )
333+ : nothing }
331334
332335 < div part ="input-wrapper ">
333336 ${ this . _chatState ?. options ?. templates ?. textInputTemplate
Original file line number Diff line number Diff line change @@ -201,11 +201,6 @@ describe('Chat', () => {
201201 <slot name="empty-state">
202202 </slot>
203203 </div>
204- <div aria-label="Suggestions" part="suggestions-container" role="list">
205- <slot name="suggestions-header" part="suggestions-header"> </slot>
206- <slot name="suggestions" part="suggestions">
207- </slot>
208- </div>
209204 <igc-chat-input>
210205 </igc-chat-input>
211206 </div>`
@@ -215,8 +210,6 @@ describe('Chat', () => {
215210
216211 expect ( inputArea ) . shadowDom . to . equal (
217212 `<div part="input-container">
218- <div aria-label="Attachments" part="attachments" role="list">
219- </div>
220213 <div part="input-wrapper">
221214 <igc-textarea
222215 part="text-input"
@@ -496,8 +489,6 @@ describe('Chat', () => {
496489
497490 expect ( inputArea ) . shadowDom . to . equal (
498491 `<div part="input-container">
499- <div aria-label="Attachments" part="attachments" role="list">
500- </div>
501492 <div part="input-wrapper">
502493 <igc-textarea
503494 part="text-input"
Original file line number Diff line number Diff line change 11import { ContextProvider } from '@lit/context' ;
2- import { html , LitElement , type TemplateResult } from 'lit' ;
2+ import { html , LitElement , nothing , type TemplateResult } from 'lit' ;
33import { property , query } from 'lit/decorators.js' ;
44import { addThemingController } from '../../theming/theming-controller.js' ;
55import IgcButtonComponent from '../button/button.js' ;
@@ -293,7 +293,10 @@ export default class IgcChatComponent extends EventEmitterMixin<
293293 < slot name ="empty-state "> </ slot >
294294 </ div > `
295295 : html `< igc-chat-message-list > </ igc-chat-message-list > ` }
296- ${ this . renderSuggestions ( ) }
296+ ${ this . _chatState . options ?. suggestions &&
297+ this . _chatState . options ?. suggestions ?. length > 0
298+ ? this . renderSuggestions ( )
299+ : nothing }
297300 < igc-chat-input > </ igc-chat-input >
298301 </ div >
299302 ` ;
You can’t perform that action at this time.
0 commit comments