webpack cannot handel <>

This commit is contained in:
andrelandgraf 2020-04-28 09:46:10 +02:00
parent 299513ec7a
commit 897d8a8e42
2 changed files with 70 additions and 70 deletions

View File

@ -252,20 +252,20 @@ import React, {
const index = indexOfMatch(currentInput, item); const index = indexOfMatch(currentInput, item);
const inputLength = currentInput.length; const inputLength = currentInput.length;
return ( return (
<> <React.Fragment>
{ index >= 0 && inputLength { index >= 0 && inputLength
// renders label with matching search string marked // renders label with matching search string marked
? ( ? (
<> <React.Fragment>
{item.label.substr(0, index) } {item.label.substr(0, index) }
<strong> <strong>
{ item.label.substr(index, inputLength) } { item.label.substr(index, inputLength) }
</strong> </strong>
{ item.label.substr(index + inputLength, item.label.length) } { item.label.substr(index + inputLength, item.label.length) }
</> </React.Fragment>
) )
: item.label } : item.label }
</> </React.Fragment>
); );
}, [currentInput]); }, [currentInput]);

View File

@ -252,20 +252,20 @@ const DataListInput = ({
const index = indexOfMatch(currentInput, item); const index = indexOfMatch(currentInput, item);
const inputLength = currentInput.length; const inputLength = currentInput.length;
return ( return (
<> <React.Fragment>
{ index >= 0 && inputLength { index >= 0 && inputLength
// renders label with matching search string marked // renders label with matching search string marked
? ( ? (
<> <React.Fragment>
{item.label.substr(0, index) } {item.label.substr(0, index) }
<strong> <strong>
{ item.label.substr(index, inputLength) } { item.label.substr(index, inputLength) }
</strong> </strong>
{ item.label.substr(index + inputLength, item.label.length) } { item.label.substr(index + inputLength, item.label.length) }
</> </React.Fragment>
) )
: item.label } : item.label }
</> </React.Fragment>
); );
}, [currentInput]); }, [currentInput]);