JS: add oldBottomMargin, oldHeight & bottomMargin
This commit is contained in:
3
doric-js/index.d.ts
vendored
3
doric-js/index.d.ts
vendored
@@ -996,6 +996,9 @@ declare module 'doric/lib/src/native/keyboard' {
|
||||
import { BridgeContext } from "doric/lib/src/runtime/global";
|
||||
export function keyboard(context: BridgeContext): {
|
||||
subscribe: (callback: (data: {
|
||||
oldBottomMargin: number;
|
||||
oldHeight: number;
|
||||
bottomMargin: number;
|
||||
height: number;
|
||||
}) => void) => Promise<string>;
|
||||
unsubscribe: (subscribeId: string) => Promise<any>;
|
||||
|
3
doric-js/lib/src/native/keyboard.d.ts
vendored
3
doric-js/lib/src/native/keyboard.d.ts
vendored
@@ -1,6 +1,9 @@
|
||||
import { BridgeContext } from "../runtime/global";
|
||||
export declare function keyboard(context: BridgeContext): {
|
||||
subscribe: (callback: (data: {
|
||||
oldBottomMargin: number;
|
||||
oldHeight: number;
|
||||
bottomMargin: number;
|
||||
height: number;
|
||||
}) => void) => Promise<string>;
|
||||
unsubscribe: (subscribeId: string) => Promise<any>;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
import { BridgeContext } from "../runtime/global"
|
||||
export function keyboard(context: BridgeContext) {
|
||||
return {
|
||||
subscribe: (callback: (data: { height: number }) => void) => {
|
||||
subscribe: (callback: (data: { oldBottomMargin: number, oldHeight: number, bottomMargin: number, height: number }) => void) => {
|
||||
return context.callNative('keyboard', 'subscribe', context.function2Id(callback)) as Promise<string>
|
||||
},
|
||||
unsubscribe: (subscribeId: string) => {
|
||||
|
Reference in New Issue
Block a user