@aclymatepackages/modules 2.1.9 → 2.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -86,6 +86,14 @@ const PdlCompanySelect = _ref2 => {
|
|
|
86
86
|
setMatchingCompanies(capitalizedCompanies);
|
|
87
87
|
return setInputComplete(true);
|
|
88
88
|
};
|
|
89
|
+
const {
|
|
90
|
+
name: selectedCompanyName
|
|
91
|
+
} = matchingCompanies.find(_ref4 => {
|
|
92
|
+
let {
|
|
93
|
+
id
|
|
94
|
+
} = _ref4;
|
|
95
|
+
return selectedCompanyId === id;
|
|
96
|
+
}) || {};
|
|
89
97
|
return /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
90
98
|
container: true,
|
|
91
99
|
spacing: 2,
|
|
@@ -97,10 +105,10 @@ const PdlCompanySelect = _ref2 => {
|
|
|
97
105
|
label: "Enter your company's name",
|
|
98
106
|
value: inputValue,
|
|
99
107
|
setValue: setInputValue,
|
|
100
|
-
onKeyPress:
|
|
108
|
+
onKeyPress: _ref5 => {
|
|
101
109
|
let {
|
|
102
110
|
key
|
|
103
|
-
} =
|
|
111
|
+
} = _ref5;
|
|
104
112
|
if (key === "Enter") {
|
|
105
113
|
return fetchMatchingCompanies();
|
|
106
114
|
}
|
|
@@ -127,11 +135,11 @@ const PdlCompanySelect = _ref2 => {
|
|
|
127
135
|
container: true,
|
|
128
136
|
spacing: 2,
|
|
129
137
|
justifyContent: "center"
|
|
130
|
-
}, matchingCompanies.map((
|
|
138
|
+
}, matchingCompanies.map((_ref6, idx) => {
|
|
131
139
|
let {
|
|
132
140
|
name,
|
|
133
141
|
meta
|
|
134
|
-
} =
|
|
142
|
+
} = _ref6;
|
|
135
143
|
return /*#__PURE__*/_react.default.createElement(CompanySelectionChip, _extends({
|
|
136
144
|
key: "company-list-item-".concat(idx),
|
|
137
145
|
name: name,
|
|
@@ -148,7 +156,7 @@ const PdlCompanySelect = _ref2 => {
|
|
|
148
156
|
}, selectedCompanyId ? /*#__PURE__*/_react.default.createElement(_material.Button, {
|
|
149
157
|
variant: "contained",
|
|
150
158
|
color: "secondary",
|
|
151
|
-
onClick: () => onSelectCompany(selectedCompanyId)
|
|
159
|
+
onClick: () => onSelectCompany(selectedCompanyId, selectedCompanyName)
|
|
152
160
|
}, "Choose this company") : /*#__PURE__*/_react.default.createElement(_material.Button, {
|
|
153
161
|
color: "primary",
|
|
154
162
|
onClick: () => onSelectCompany("none", inputValue)
|
package/package.json
CHANGED
|
@@ -72,6 +72,9 @@ const PdlCompanySelect = ({ onSelectCompany, apiKey }) => {
|
|
|
72
72
|
return setInputComplete(true);
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
+
const { name: selectedCompanyName } =
|
|
76
|
+
matchingCompanies.find(({ id }) => selectedCompanyId === id) || {};
|
|
77
|
+
|
|
75
78
|
return (
|
|
76
79
|
<Grid container spacing={2} direction="column">
|
|
77
80
|
<Grid item>
|
|
@@ -128,7 +131,9 @@ const PdlCompanySelect = ({ onSelectCompany, apiKey }) => {
|
|
|
128
131
|
<Button
|
|
129
132
|
variant="contained"
|
|
130
133
|
color="secondary"
|
|
131
|
-
onClick={() =>
|
|
134
|
+
onClick={() =>
|
|
135
|
+
onSelectCompany(selectedCompanyId, selectedCompanyName)
|
|
136
|
+
}
|
|
132
137
|
>
|
|
133
138
|
Choose this company
|
|
134
139
|
</Button>
|