fix onBeforeInput memoization (#3347)
fix onBeforeInput memoization (#3347)

* fix memoization of onBeforeInput callback

* fix lint

* fix callbacks dependencies

ianstormtaylor/slate,ianstormtaylor/slate