diff --git a/package-lock.json b/package-lock.json
index 85a59a66..84f77334 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2800,6 +2800,15 @@
"@types/testing-library__react": "^9.1.2"
}
},
+ "@toast-ui/editor": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/@toast-ui/editor/-/editor-2.5.1.tgz",
+ "integrity": "sha512-LVNo/YaNItUemEaRFvFAVn7w/0U7yxEheMdn6GEGxqo727rRZD1MH7OTDVq6NeQ+P93VwFpa0i9GGRBhNNEbPQ==",
+ "requires": {
+ "@types/codemirror": "0.0.71",
+ "codemirror": "^5.48.4"
+ }
+ },
"@types/anymatch": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.1.tgz",
@@ -2847,6 +2856,19 @@
"@babel/types": "^7.3.0"
}
},
+ "@types/codemirror": {
+ "version": "0.0.71",
+ "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.71.tgz",
+ "integrity": "sha512-b2oEEnno1LIGKMR7uBEsr40al1UijF1HEpRn0+Yf1xOLl24iQgB7DBpZVMM7y54G5wCNoclDrRO65E6KHPNO2w==",
+ "requires": {
+ "@types/tern": "*"
+ }
+ },
+ "@types/estree": {
+ "version": "0.0.46",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.46.tgz",
+ "integrity": "sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg=="
+ },
"@types/glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz",
@@ -2991,6 +3013,14 @@
"integrity": "sha512-W+bw9ds02rAQaMvaLYxAbJ6cvguW/iJXNT6lTssS1ps6QdrMKttqEAMEG/b5CR8TZl3/L7/lH0ZV5nNR1LXikA==",
"dev": true
},
+ "@types/tern": {
+ "version": "0.23.3",
+ "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.3.tgz",
+ "integrity": "sha512-imDtS4TAoTcXk0g7u4kkWqedB3E4qpjXzCpD2LU5M5NAXHzCDsypyvXSaG7mM8DKYkCRa7tFp4tS/lp/Wo7Q3w==",
+ "requires": {
+ "@types/estree": "*"
+ }
+ },
"@types/testing-library__dom": {
"version": "6.14.0",
"resolved": "https://registry.npmjs.org/@types/testing-library__dom/-/testing-library__dom-6.14.0.tgz",
@@ -4942,6 +4972,11 @@
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true
},
+ "codemirror": {
+ "version": "5.59.3",
+ "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.59.3.tgz",
+ "integrity": "sha512-p1d4BjmBBssgnEGtQeWvE5PdiDffqZjiJ77h2FZ2J2BpW9qdOzf6v7IQscyE+TgyKBQS3PpsYimfEDNgcNRZGQ=="
+ },
"collect-v8-coverage": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz",
diff --git a/src/components/AsyncSelect/index.jsx b/src/components/AsyncSelect/index.jsx
new file mode 100644
index 00000000..269ad803
--- /dev/null
+++ b/src/components/AsyncSelect/index.jsx
@@ -0,0 +1,111 @@
+/**
+ * AsyncSelect
+ *
+ * A wrapper for react-select's AsyncCreatableSelect.
+ */
+import React from "react";
+import PT from "prop-types";
+import AsyncCreatableSelect from "react-select/async-creatable";
+import "./styles.module.scss";
+
+const AsyncSelect = (props) => {
+ const customStyles = {
+ control: (provided, state) => ({
+ ...provided,
+ minHeight: "40px",
+ border: "1px solid #aaaaab",
+ borderColor: state.isFocused ? "#55a5ff" : "#aaaaab",
+ boxShadow: state.isFocused ? "0 0 2px 1px #cee6ff" : provided.boxShadow,
+ }),
+ menu: (provided) => ({
+ ...provided,
+ minHeight: "40px",
+ zIndex: 10,
+ }),
+ valueContainer: (provided) => ({
+ ...provided,
+ padding: "2px 6px",
+ }),
+ input: (provided) => ({
+ ...provided,
+ margin: "0px",
+ height: "auto",
+ padding: "0",
+ }),
+ indicatorSeparator: () => ({
+ display: "none",
+ }),
+ indicatorsContainer: (provided) => ({
+ ...provided,
+ height: "auto",
+ }),
+ option: (provided) => ({
+ ...provided,
+ minHeight: "32px",
+ }),
+ placeholder: (provided) => ({
+ ...provided,
+ color: "#AAAAAA",
+ fontFamily: "Roboto",
+ fontSize: "14px",
+ lineHeight: "22px",
+ textAlign: "left",
+ fontWeight: "400",
+ }),
+ multiValue: (provided) => ({
+ ...provided,
+ margin: "3px 3px",
+ color: "#AAAAAA",
+ fontFamily: "Roboto",
+ fontSize: "14px",
+ lineHeight: "22px",
+ textAlign: "left",
+ borderRadius: "5px",
+ }),
+ dropdownIndicator: () => ({
+ display: "none",
+ }),
+ };
+
+ return (
+
+
props.noOptionsText}
+ loadingMessage={() => props.loadingText}
+ isDisabled={props.disabled}
+ cacheOptions={props.cacheOptions}
+ loadOptions={props.loadOptions}
+ defaultOptions={props.defaultOptions}
+ />
+
+ )
+}
+
+AsyncSelect.propTypes = {
+ value: PT.string,
+ onChange: PT.func,
+ placeholder: PT.string,
+ error: PT.string,
+ isMulti: PT.bool,
+ onBlur: PT.func,
+ onFocus: PT.func,
+ onInputChange: PT.func,
+ cacheOptions: PT.bool,
+ onInputChange: PT.func,
+ noOptionsText: PT.string,
+ loadingText: PT.string,
+ loadOptions: PT.func,
+ defaultOptions: PT.bool || PT.array,
+ disabled: PT.bool,
+}
+
+export default AsyncSelect;
\ No newline at end of file
diff --git a/src/components/AsyncSelect/styles.module.scss b/src/components/AsyncSelect/styles.module.scss
new file mode 100644
index 00000000..96ffd0d3
--- /dev/null
+++ b/src/components/AsyncSelect/styles.module.scss
@@ -0,0 +1,18 @@
+.error {
+ :first-child {
+ border-color: #ff5b52;
+ }
+}
+
+.select-wrapper {
+ input {
+ border: none !important;
+ box-shadow: none !important;
+ transition: none !important;
+ height: 28px;
+ }
+}
+
+.react-select__option {
+ min-height: 32px;
+}
diff --git a/src/components/ReactSelect/index.jsx b/src/components/ReactSelect/index.jsx
index 567b70b2..1101fe59 100644
--- a/src/components/ReactSelect/index.jsx
+++ b/src/components/ReactSelect/index.jsx
@@ -70,38 +70,20 @@ const ReactSelect = (props) => {
return (
- {props.isCreatable ? (
- props.noOptionsText}
- createOptionPosition="first"
- isDisabled={props.disabled}
- />
- ) : (
-
);
};
@@ -121,7 +103,6 @@ ReactSelect.propTypes = {
label: PT.string.isRequired,
}).isRequired
),
- isCreatable: PT.bool,
noOptionsText: PT.string,
disabled: PT.bool,
};
diff --git a/src/routes/TeamAccess/actions/index.js b/src/routes/TeamAccess/actions/index.js
index 4dd31276..8b062e39 100644
--- a/src/routes/TeamAccess/actions/index.js
+++ b/src/routes/TeamAccess/actions/index.js
@@ -6,7 +6,6 @@ import {
getTeamMembers,
getTeamInvitees,
deleteTeamMember,
- getMemberSuggestions,
postMembers,
} from "services/teams";
import { ACTION_TYPE } from "constants";
@@ -74,31 +73,6 @@ export const removeTeamMember = (teamId, memberId) => ({
},
});
-/**
- * Loads suggestions for invites
- *
- * @param {string} fragment
- *
- * @returns {Promise