private onLeadInSet()

in src/components/Bookmark/EditBookmark.tsx [74:93]


  private onLeadInSet(value?: number) {
    const {
      annotation: existingAnnotation,
      numLeadInStates: existingNumLeadInStates,
      onBookmarkChange,
    } = this.props;

    const annotation = this.annotationComponent.value;
    const isBookmarkUpdated = value !== existingNumLeadInStates || annotation !== existingAnnotation;

    if (isBookmarkUpdated && onBookmarkChange) {
      onBookmarkChange({
        name: this.props.name,
        data: {
          annotation,
          numLeadInStates: value,
        },
      });
    }
  }