onKeyboardWillHide(listener: Function)

Requires:
BaseKit≥3.6.6@ray-js/ray≥1.5.30
Platforms:
iOSAndroid
import { onKeyboardWillHide } from '@ray-js/ray';

// Promise usage
try {
  const res = await onKeyboardWillHide({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Description

Keyboard message

Parameters

ParameterTypeRequiredDescription
Yes

Return Value

None

Examples

import { onKeyboardWillHide, scanCode } from '@ray-js/ray'

// Register the keyboard hide event and use scanCode's keyboard input mode to bring up and then hide the system keyboard.
// Passing isShowKeyboard: true: after entering the keyboard input page, the keyboard pops up automatically; tapping Back/Cancel to exit the input page hides the keyboard, triggering onKeyboardWillHide.
onKeyboardWillHide(e => {
  console.log("[onKeyboardWillHide]", e);
});

scanCode({
  onlyFromCamera: false,
  isShowKeyboard: true,
  keyboardBean: { title: "Keyboard input" },
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});