diff options
| author | Nate Sesti <sestinj@gmail.com> | 2023-08-12 00:26:23 -0700 | 
|---|---|---|
| committer | Nate Sesti <sestinj@gmail.com> | 2023-08-12 00:26:23 -0700 | 
| commit | 5590f63e42fda38d780bdc390361a65b65576498 (patch) | |
| tree | 417d25b95aeb064e1cbd11caee29659a17aa0291 /extension | |
| parent | c6dab7e986618ebac113b8a2f57b6404975aac9b (diff) | |
| download | sncontinue-5590f63e42fda38d780bdc390361a65b65576498.tar.gz sncontinue-5590f63e42fda38d780bdc390361a65b65576498.tar.bz2 sncontinue-5590f63e42fda38d780bdc390361a65b65576498.zip  | |
feat: :sparkles: improvement to @ search rankings
Diffstat (limited to 'extension')
| -rw-r--r-- | extension/react-app/src/components/ComboBox.tsx | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index b189e442..651d6227 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -431,6 +431,11 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {                  event.preventDefault();                } else if (event.key === "Tab") {                  (event.nativeEvent as any).preventDownshiftDefault = true; +              } else if ( +                (event.key === "ArrowUp" || event.key === "ArrowDown") && +                items.length > 0 +              ) { +                return;                } else if (event.key === "ArrowUp") {                  // Only go back in history if selectionStart is 0                  // (i.e. the cursor is at the beginning of the input) @@ -438,11 +443,6 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {                    positionInHistory == 0 ||                    event.currentTarget.selectionStart !== 0                  ) { -                  console.log( -                    "returning", -                    positionInHistory, -                    event.currentTarget.selectionStart -                  );                    (event.nativeEvent as any).preventDownshiftDefault = true;                    return;                  } else if (  | 
