From 67a3279ef7d855fb8b035816915a62639855ec0e Mon Sep 17 00:00:00 2001 From: Mikael Svenson Date: Thu, 8 Nov 2018 08:09:10 +0100 Subject: [PATCH] Hide node which causes border in IE11 --- .../Layouts/SearchResultsTemplate.tsx | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/samples/react-search-refiners/src/webparts/searchResults/components/Layouts/SearchResultsTemplate.tsx b/samples/react-search-refiners/src/webparts/searchResults/components/Layouts/SearchResultsTemplate.tsx index dfaa46395..dd094ad78 100644 --- a/samples/react-search-refiners/src/webparts/searchResults/components/Layouts/SearchResultsTemplate.tsx +++ b/samples/react-search-refiners/src/webparts/searchResults/components/Layouts/SearchResultsTemplate.tsx @@ -1,7 +1,7 @@ import React = require('react'); import ISearchResultsTemplateProps from './ISearchResultsTemplateProps'; import ISearchResultsTemplateState from './ISearchResultsTemplateState'; -import './SearchResultsTemplate.scss'; +import './SearchResultsTemplate.scss'; import { Resize } from 'on-el-resize'; import { DomHelper } from '../../../../helpers/DomHelper'; @@ -12,7 +12,7 @@ export default class SearchResultsTemplate extends React.Component this.parentRef = el}> -
- ; + return
this.parentRef = el}> +
+
; } - + public componentWillUnmount() { this.resize.removeResizeListener(this.parentRef, this.onComponentResize); } public componentDidMount() { - this._updateTemplate(this.props); + this._updateTemplate(this.props); this.resize.addResizeListener(this.parentRef, this.onComponentResize); } public componentDidUpdate() { - // Post render operations (previews on elements, etc.) - this.props.templateService.initPreviewElements(); - this.onComponentResize(); + this.props.templateService.initPreviewElements(); + this.onComponentResize(); } public componentWillReceiveProps(nextProps: ISearchResultsTemplateProps) { @@ -66,7 +69,7 @@ export default class SearchResultsTemplate extends React.Component { - elt.style.width = Math.floor(this.parentRef.offsetWidth/2) + 'px'; + elt.style.width = Math.floor(this.parentRef.offsetWidth / 2) + 'px'; }); } }