Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IExtensionMutable

Extends the base node classes with React Native specific properties. These properties are useful on the client side to style and perform user actions on nodes.

Hierarchy

  • IExtensionMutable

Index

Properties

Methods

Properties

Optional style

style: StyleProp<TextStyle>

The style to apply to the component

Methods

Optional onLongPress

  • onLongPress(data: INodeImmutable): EventAction | void
  • A function that is invoked when the DOM element is held (pressed + held).

    example
    Prevent the default ```ts import { EventAction } from '@ef-carbon/react-native-dom' node.onLongPress = (data: INode) { // Do something here return EventAction.PreventDefault; } ```

    Parameters

    • data: INodeImmutable

      The node data of the DOM node that was tapped

    Returns EventAction | void

    by default the handler will not stop the propagation of handling a hold gesture.

Optional onPress

  • onPress(data: INodeImmutable): EventAction | void
  • A function that is invoked when the DOM element is tapped (pressed).

    example
    Prevent the default ```ts import { EventAction } from '@ef-carbon/react-native-dom' node.onPress = (data: INode) { // Do something here return EventAction.PreventDefault; } ```

    Parameters

    • data: INodeImmutable

      The node data of the DOM node that was tapped

    Returns EventAction | void

    by default the handler will not stop the propagation of handling a tap gesture. i.e. an onPress handler for a Link node will continue to open the URL, unless EventAction.PreventDefault is passed