From 4cca2f230560637315d18f9d9d544a2bad890921 Mon Sep 17 00:00:00 2001 From: Peter Kupietz Date: Wed, 21 Aug 2019 15:18:41 +0200 Subject: [PATCH] Fix renderMatchingLabel for indexOfMatch > 0 --- src/DataListInput.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataListInput.jsx b/src/DataListInput.jsx index 956706c..b6c4807 100644 --- a/src/DataListInput.jsx +++ b/src/DataListInput.jsx @@ -252,7 +252,7 @@ class DataListInput extends React.Component { { item.label.substr( indexOfMatch, currentInput.length ) } - { item.label.substr( currentInput.length, item.label.length ) } + { item.label.substr( indexOfMatch + currentInput.length, item.label.length ) } );