New to KendoReactStart a free 30-day trial

Definition

Package:@progress/kendo-react-common

Syntax:

tsx
class MyComponent extends React.Component {
  private KendoPasteSubscription?: KendoPasteSubscription;

  componentDidMount() {
    this.KendoPasteSubscription = subscribeToKendoPaste(this.element, {
      fieldName: this.props.name,
      onValueChange: (value) => this.handleSmartPasteValue(value)
    });
  }

  componentWillUnmount() {
    this.KendoPasteSubscription?.unsubscribe();
  }
}

Subscribe to smart paste events for class components. Call this in componentDidMount and store the result. Call unsubscribe() in componentWillUnmount.

Parameters:elementundefined | null | Element

The DOM element to use for finding the event target

optionsKendoPasteSubscriptionOptions

Configuration options for the smart paste subscription

Returns:

KendoPasteSubscription

A subscription object with an unsubscribe method

In this article
Definition
Not finding the help you need?
Contact Support