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 inputLength = currentInput.length;
return (
<>
<React.Fragment>
{ index >= 0 && inputLength
// renders label with matching search string marked
? (
<>
<React.Fragment>
{item.label.substr(0, index) }
<strong>
{ item.label.substr(index, inputLength) }
</strong>
{ item.label.substr(index + inputLength, item.label.length) }
</>
</React.Fragment>
)
: item.label }
</>
</React.Fragment>
);
}, [currentInput]);

View File

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