Skip to content

Commit 5b94394

Browse files
committed
remove useless changes
Signed-off-by: basseche <[email protected]>
1 parent 3274603 commit 5b94394

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/components/directoryItemSelector/DirectoryItemSelector.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ export interface DirectoryItemSelectorProps extends TreeViewFinderProps {
159159
itemFilter?: (val: ElementAttributes) => boolean;
160160
expanded?: UUID[];
161161
selected?: UUID[];
162-
fetchMetaData?: boolean;
163162
}
164163

165164
function sortHandlingDirectories(a: TreeViewFinderNodeProps, b: TreeViewFinderNodeProps): number {
@@ -181,7 +180,6 @@ export function DirectoryItemSelector({
181180
expanded,
182181
selected,
183182
onClose,
184-
fetchMetaData,
185183
...otherTreeViewFinderProps
186184
}: Readonly<DirectoryItemSelectorProps>) {
187185
const [data, setData] = useState<TreeViewFinderNodeProps[]>([]);
@@ -269,11 +267,7 @@ export function DirectoryItemSelector({
269267
const childrenMatchedTypes = children.filter((item: ElementAttributes) =>
270268
contentFilter().has(item.type)
271269
);
272-
273-
if (
274-
childrenMatchedTypes.length > 0 &&
275-
((equipmentTypes && equipmentTypes.length > 0) || fetchMetaData)
276-
) {
270+
if (childrenMatchedTypes.length > 0 && equipmentTypes && equipmentTypes.length > 0) {
277271
return fetchElementsInfos(
278272
childrenMatchedTypes.map((e: ElementAttributes) => e.elementUuid),
279273
types,
@@ -301,7 +295,7 @@ export function DirectoryItemSelector({
301295
console.warn(`Could not update subs (and content) of '${nodeId}' : ${error.message}`);
302296
});
303297
},
304-
[types, equipmentTypes, fetchMetaData, contentFilter, itemFilter, addToDirectory]
298+
[types, equipmentTypes, itemFilter, contentFilter, addToDirectory]
305299
);
306300

307301
// Helper function to fetch children for a node if not already loaded

src/components/inputs/reactHookForm/DirectoryItemsInput.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ export function DirectoryItemsInput({
263263
selected={selected}
264264
expanded={expanded}
265265
multiSelect={multiSelect}
266-
fetchMetaData={!!equipmentColorsMap}
267266
/>
268267
</>
269268
);

0 commit comments

Comments
 (0)