OSDN Git Service

update react-autocomplete and fixed the bug for pointer.
authorZhiting Lin <zlin035@uottawa.ca>
Fri, 28 Sep 2018 11:40:27 +0000 (19:40 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Fri, 28 Sep 2018 11:40:27 +0000 (19:40 +0800)
package-lock.json
package.json
src/features/shared/components/Autocomplete/AutocompleteField.scss

index 6f59671..3308d27 100644 (file)
       }
     },
     "react-autosuggest": {
-      "version": "6.0.4",
-      "resolved": "https://registry.npmjs.org/react-autosuggest/-/react-autosuggest-6.0.4.tgz",
-      "integrity": "sha1-d3mMaSeWxJ6Mdb8/SyEnhAKNPrM=",
+      "version": "9.4.2",
+      "resolved": "https://registry.npmjs.org/react-autosuggest/-/react-autosuggest-9.4.2.tgz",
+      "integrity": "sha512-GkLFnr+79DtDFMNxbjKzTKEwOfItw2mKiCNTD3bE+gZSPf5Y+i+W+8KySmBnDWFPF5cuJeuBhQBgcSdbp45nAg==",
       "requires": {
-        "react-autowhatever": "5.4.0",
-        "react-redux": "4.4.9",
-        "redux": "3.5.2",
+        "prop-types": "15.6.1",
+        "react-autowhatever": "10.1.2",
         "shallow-equal": "1.0.0"
       }
     },
     "react-autowhatever": {
-      "version": "5.4.0",
-      "resolved": "https://registry.npmjs.org/react-autowhatever/-/react-autowhatever-5.4.0.tgz",
-      "integrity": "sha1-Ay6n8MWgVRY9FGGii6rgNn25J5o=",
+      "version": "10.1.2",
+      "resolved": "https://registry.npmjs.org/react-autowhatever/-/react-autowhatever-10.1.2.tgz",
+      "integrity": "sha512-+0XgELT1LF7hHEJv5H5Zwkfb4Q1rqmMZZ5U/XJ2J+UcSPRKnG6CqEjXUJ+hYLXDHgvDqwEN5PBdxczD5rHvOuA==",
       "requires": {
+        "prop-types": "15.6.1",
         "react-themeable": "1.1.0",
         "section-iterator": "2.0.0"
       }
index bd46138..448e075 100644 (file)
@@ -30,7 +30,7 @@
     "prop-types": "^15.5.8",
     "react": "~15.5.0",
     "react-ace": "~3.5.0",
-    "react-autosuggest": "~6.0.4",
+    "react-autosuggest": "~9.4.2",
     "react-bootstrap": "~0.30.3",
     "react-dom": "~15.5.0",
     "react-markdown": "^2.5.0",
index 00b7484..fbe7357 100644 (file)
@@ -1,8 +1,12 @@
-.suggestionsContainer {
+.container {
   position: relative;
 }
 
-.suggestionsList {
+.suggestionsContainer{
+  display: none;
+}
+
+.suggestionsContainerOpen {
   background: $body-bg;
   border: 1px solid $input-border;
   border-radius: $input-border-radius-large;
   list-style-type: none;
   margin-top: 6px;
   max-height: 200px;
-  overflow-y: scroll;
+  overflow-y: auto;
   padding: 0;
   position: absolute;
   top: 40px;
   width: 100%;
   z-index: 10;
+  display: block;
+}
+
+.suggestionsList {
+  margin: 0;
+  padding: 0;
+  list-style-type: none;
 }
 
 .suggestion {
+  cursor: pointer;
   border-bottom: 1px solid $input-border;
 
   &:last-child {
@@ -36,7 +48,7 @@
   }
 }
 
-.suggestionFocused {
+.suggestionHighlighted {
   color: $brand-primary;
   background: #e6e6e6;
 }