New to KendoReactLearn about KendoReact Free.

subscribeToKendoPaste

Updated on Feb 6, 2026

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

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();
  }
}

Parameters

element

undefined | "null" | Element

The DOM element to use for finding the event target
options

KendoPasteSubscriptionOptions

Configuration options for the smart paste subscription

Returns

KendoPasteSubscription

A subscription object with an unsubscribe method
Not finding the help you need?
Contact Support