mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-26 22:32:45 +00:00
Added QoL, where if errors are present, we run the checker on text input to give quicker feedback
This commit is contained in:
@@ -86,9 +86,15 @@ var EditPage = React.createClass({
|
||||
},
|
||||
|
||||
handleTextChange : function(text){
|
||||
|
||||
//If there are errors, run the validator on everychange to give quick feedback
|
||||
var htmlErrors = this.state.htmlErrors;
|
||||
if(htmlErrors.length) htmlErrors = Markdown.validate(text);
|
||||
|
||||
this.setState({
|
||||
text : text,
|
||||
isPending : true
|
||||
isPending : true,
|
||||
htmlErrors : htmlErrors
|
||||
});
|
||||
|
||||
(this.hasChanges() ? this.debounceSave() : this.debounceSave.cancel());
|
||||
|
||||
Reference in New Issue
Block a user