This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
export default function withPropsChecker(WrappedComponent) { | |
return class PropsChecker extends Component { | |
componentWillReceiveProps(nextProps) { | |
Object.keys(nextProps) | |
.filter(key => { | |
return nextProps[key] !== this.props[key]; | |
}) | |
.map(key => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// =========== Input Field Listener with AJAX Callback ============== | |
function FieldListener(entity){ | |
var t = this; | |
this.typingTimer; // Timer identifier | |
this.doneTypingInterval = 750; // Time in ms. e.g.; 5000 = 5secs | |
this.entity = entity; | |
this.noticeSpan = this.entity.siblings("span"); | |
this.parentForm = entity.parents('form:first'); | |
entity.on("keyup", function(){t.setTimer();}); |