@aclymatepackages/modules 2.1.9 → 2.1.11
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,15 @@ 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
|
+
meta
|
|
94
|
+
} = _ref4;
|
|
95
|
+
return selectedCompanyId === meta.id;
|
|
96
|
+
}) || {};
|
|
97
|
+
console.log("selected company name: ", selectedCompanyName);
|
|
89
98
|
return /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
90
99
|
container: true,
|
|
91
100
|
spacing: 2,
|
|
@@ -97,10 +106,10 @@ const PdlCompanySelect = _ref2 => {
|
|
|
97
106
|
label: "Enter your company's name",
|
|
98
107
|
value: inputValue,
|
|
99
108
|
setValue: setInputValue,
|
|
100
|
-
onKeyPress:
|
|
109
|
+
onKeyPress: _ref5 => {
|
|
101
110
|
let {
|
|
102
111
|
key
|
|
103
|
-
} =
|
|
112
|
+
} = _ref5;
|
|
104
113
|
if (key === "Enter") {
|
|
105
114
|
return fetchMatchingCompanies();
|
|
106
115
|
}
|
|
@@ -127,11 +136,11 @@ const PdlCompanySelect = _ref2 => {
|
|
|
127
136
|
container: true,
|
|
128
137
|
spacing: 2,
|
|
129
138
|
justifyContent: "center"
|
|
130
|
-
}, matchingCompanies.map((
|
|
139
|
+
}, matchingCompanies.map((_ref6, idx) => {
|
|
131
140
|
let {
|
|
132
141
|
name,
|
|
133
142
|
meta
|
|
134
|
-
} =
|
|
143
|
+
} = _ref6;
|
|
135
144
|
return /*#__PURE__*/_react.default.createElement(CompanySelectionChip, _extends({
|
|
136
145
|
key: "company-list-item-".concat(idx),
|
|
137
146
|
name: name,
|
|
@@ -148,7 +157,7 @@ const PdlCompanySelect = _ref2 => {
|
|
|
148
157
|
}, selectedCompanyId ? /*#__PURE__*/_react.default.createElement(_material.Button, {
|
|
149
158
|
variant: "contained",
|
|
150
159
|
color: "secondary",
|
|
151
|
-
onClick: () => onSelectCompany(selectedCompanyId)
|
|
160
|
+
onClick: () => onSelectCompany(selectedCompanyId, selectedCompanyName)
|
|
152
161
|
}, "Choose this company") : /*#__PURE__*/_react.default.createElement(_material.Button, {
|
|
153
162
|
color: "primary",
|
|
154
163
|
onClick: () => onSelectCompany("none", inputValue)
|
package/package.json
CHANGED
|
@@ -72,6 +72,10 @@ const PdlCompanySelect = ({ onSelectCompany, apiKey }) => {
|
|
|
72
72
|
return setInputComplete(true);
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
+
const { name: selectedCompanyName } =
|
|
76
|
+
matchingCompanies.find(({ meta }) => selectedCompanyId === meta.id) || {};
|
|
77
|
+
console.log("selected company name: ", selectedCompanyName);
|
|
78
|
+
|
|
75
79
|
return (
|
|
76
80
|
<Grid container spacing={2} direction="column">
|
|
77
81
|
<Grid item>
|
|
@@ -128,7 +132,9 @@ const PdlCompanySelect = ({ onSelectCompany, apiKey }) => {
|
|
|
128
132
|
<Button
|
|
129
133
|
variant="contained"
|
|
130
134
|
color="secondary"
|
|
131
|
-
onClick={() =>
|
|
135
|
+
onClick={() =>
|
|
136
|
+
onSelectCompany(selectedCompanyId, selectedCompanyName)
|
|
137
|
+
}
|
|
132
138
|
>
|
|
133
139
|
Choose this company
|
|
134
140
|
</Button>
|