Skip to content

Commit 8529c05

Browse files
Move boolean showXCell variables to be later and together
1 parent 70b2e68 commit 8529c05

File tree

1 file changed

+7
-7
lines changed
  • extensions/ql-vscode/src/view/data-extensions-editor

1 file changed

+7
-7
lines changed

extensions/ql-vscode/src/view/data-extensions-editor/MethodRow.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ export const MethodRow = ({
137137
});
138138
}, [externalApiUsage]);
139139

140-
const methodCanBeModeled =
141-
!externalApiUsage.supported ||
142-
(modeledMethod && modeledMethod?.type !== "none");
143140
const modelTypeOptions = useMemo(
144141
() => [
145142
{ value: "none", label: "Unmodeled" },
@@ -151,8 +148,6 @@ export const MethodRow = ({
151148
[],
152149
);
153150

154-
const showInputCell =
155-
modeledMethod?.type && ["sink", "summary"].includes(modeledMethod?.type);
156151
const inputOptions = useMemo(
157152
() => [
158153
{ value: "Argument[this]", label: "Argument[this]" },
@@ -164,8 +159,6 @@ export const MethodRow = ({
164159
[argumentsList],
165160
);
166161

167-
const showOutputCell =
168-
modeledMethod?.type && ["source", "summary"].includes(modeledMethod?.type);
169162
const outputOptions = useMemo(
170163
() => [
171164
{ value: "ReturnValue", label: "ReturnValue" },
@@ -178,6 +171,13 @@ export const MethodRow = ({
178171
[argumentsList],
179172
);
180173

174+
const methodCanBeModeled =
175+
!externalApiUsage.supported ||
176+
(modeledMethod && modeledMethod?.type !== "none");
177+
const showInputCell =
178+
modeledMethod?.type && ["sink", "summary"].includes(modeledMethod?.type);
179+
const showOutputCell =
180+
modeledMethod?.type && ["source", "summary"].includes(modeledMethod?.type);
181181
const predicate =
182182
modeledMethod?.type && modeledMethod.type !== "none"
183183
? extensiblePredicateDefinitions[modeledMethod.type]

0 commit comments

Comments
 (0)