How to use the @remirror/core-utils.transactionChanged function in @remirror/core-utils

To help you get started, we’ve selected a few @remirror/core-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ifiokjr / remirror / packages / prosemirror-suggest / src / suggest-state.ts View on Github external
public apply({ tr, newState }: TransactionParams & CompareStateParams) {
    const { exit } = this.handlerMatches;

    if (!transactionChanged(tr) && !this.removed) {
      return this;
    }

    this.mapIgnoredDecorations(tr);

    // If the previous run was an exit reset the suggestion matches
    if (exit) {
      this.resetState();
    }

    this.prev = this.next;

    // Match against the current selection position
    this.updateReasons({ $pos: tr.selection.$from, state: newState });

    return this;