Skip to content

Commit 4b5919a

Browse files
author
Valerio Como
committed
onValueChange
1 parent f27facc commit 4b5919a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

packages/ketchup/src/components/kup-input-panel/kup-input-panel-declarations.ts

+1
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,5 @@ export enum KupInputPanelProps {
7373
data = 'Actual data of the input panel.',
7474
hiddenSubmitButton = 'Creates a hidden submit button in order to submit the form with enter.',
7575
submitCb = 'Sets the callback function on submit form',
76+
valueChangeCb = 'Sets the callback function on value change event',
7677
}

packages/ketchup/src/components/kup-input-panel/kup-input-panel.tsx

+14
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ import { KupDom } from '../../managers/kup-manager/kup-manager-declarations';
4343
import { KupDataCell } from '../../components';
4444
import { getProps, setProps } from '../../utils/utils';
4545

46+
interface ValueChangeEvent {
47+
data: {
48+
[key: string]: number | string | object;
49+
// field: string;
50+
// value: number | string | object;
51+
};
52+
}
53+
4654
const dom: KupDom = document.documentElement as KupDom;
4755
@Component({
4856
tag: 'kup-input-panel',
@@ -84,6 +92,12 @@ export class KupInputPanel {
8492
* @default null
8593
*/
8694
@Prop() submitCb: (e: SubmitEvent) => unknown = null;
95+
96+
/**
97+
* Sets the callback function on value change event
98+
* @default null
99+
*/
100+
@Prop() valueChangeCb: (e: ValueChangeEvent) => unknown = null;
87101
//#endregion
88102

89103
//#region STATES

0 commit comments

Comments
 (0)