Skip to content

Commit bf01977

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

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/components/directoryItemSelector/DirectoryItemSelector.tsx

Lines changed: 2 additions & 7 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[]>([]);
@@ -270,10 +268,7 @@ export function DirectoryItemSelector({
270268
contentFilter().has(item.type)
271269
);
272270

273-
if (
274-
childrenMatchedTypes.length > 0 &&
275-
((equipmentTypes && equipmentTypes.length > 0) || fetchMetaData)
276-
) {
271+
if (childrenMatchedTypes.length > 0 && equipmentTypes && equipmentTypes.length > 0) {
277272
return fetchElementsInfos(
278273
childrenMatchedTypes.map((e: ElementAttributes) => e.elementUuid),
279274
types,
@@ -301,7 +296,7 @@ export function DirectoryItemSelector({
301296
console.warn(`Could not update subs (and content) of '${nodeId}' : ${error.message}`);
302297
});
303298
},
304-
[types, equipmentTypes, fetchMetaData, contentFilter, itemFilter, addToDirectory]
299+
[types, equipmentTypes, itemFilter, contentFilter, addToDirectory]
305300
);
306301

307302
// 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)