From d293bc0b799a679cd27ed4ef6e818b0ca96998d9 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Wed, 8 Jul 2015 11:34:34 -0700 Subject: Implemented basic text formatting package using a modfied version of the marked js library. Supports *bold*, _italics_, and `code` --- web/react/components/search_results.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'web/react/components/search_results.jsx') diff --git a/web/react/components/search_results.jsx b/web/react/components/search_results.jsx index 643ad112b..8f6bd861a 100644 --- a/web/react/components/search_results.jsx +++ b/web/react/components/search_results.jsx @@ -84,6 +84,8 @@ var SearchItem = React.createClass({ channelName = (channel.type === 'D') ? "Private Message" : channel.display_name; } + var searchItemKey = Date.now().toString(); + return (
{ channelName }
@@ -99,7 +101,7 @@ var SearchItem = React.createClass({ -
{message}
+
{message}
); @@ -131,6 +133,7 @@ module.exports = React.createClass({ if (this.isMounted()) { var newState = getStateFromStores(); if (!utils.areStatesEqual(newState, this.state)) { + newState.last_edit_time = Date.now(); this.setState(newState); } } @@ -152,6 +155,11 @@ module.exports = React.createClass({ var noResults = (!results || !results.order || !results.order.length); var searchTerm = PostStore.getSearchTerm(); + var searchItemKey = ""; + if (this.state.last_edit_time) { + searchItemKey += this.state.last_edit_time.toString(); + } + return (
{searchForm}
@@ -162,7 +170,7 @@ module.exports = React.createClass({ { noResults ?
No results
: results.order.map(function(id) { var post = results.posts[id]; - return + return }, this) } -- cgit v1.2.3-1-g7c22