diff --git a/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx b/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx index 148b00c91d..f25416ce66 100644 --- a/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx +++ b/packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx @@ -146,6 +146,9 @@ export class KupInputPanel { [FCellTypes.COMBOBOX, ['kup-combobox-iconclick']], ]); #listeners: { event: string; handler: (e) => void }[] = []; + #cellTypeComponents: Map = new Map([ + [FCellTypes.DATE, 'kup-date-picker'], + ]); //#endregion //#region WATCHERS @@ -471,6 +474,24 @@ export class KupInputPanel { }, []) : []; + inpuPanelCells.map(({ cells }: InputPanelCells) => + cells.map(({ cell, column }) => { + const cellType = dom.ketchup.data.cell.getType( + cell, + cell.shape + ); + const componentQuery = this.#cellTypeComponents.get(cellType); + if (!componentQuery) { + return; + } + + const el: any = this.rootElement.shadowRoot.querySelector( + `${componentQuery}[id=${column.name}]` + ); + el?.setValue(cell.value); + }) + ); + this.inputPanelCells = inpuPanelCells; }