mirror of
https://github.com/danog/react-datalist-input.git
synced 2024-12-02 09:27:53 +01:00
webpack cannot handel <>
This commit is contained in:
parent
299513ec7a
commit
897d8a8e42
@ -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]);
|
||||
|
||||
|
@ -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]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user