(null);
useEffect(() => {
if (tabRef.current && isActive) {
tabRef.current?.scrollIntoView();
}
}, [isActive]);
useEffect(
() =>
EditorEvents.subscribe((hostname: string, filePath: ContentFilePath) => {
if (tabId !== getTabId(hostname, filePath)) {
return;
}
rerender();
}),
[rerender, tabId],
);
return (
{
tabRef.current = element;
provided.innerRef(element);
}}
{...provided.draggableProps}
{...provided.dragHandleProps}
style={{
...provided.draggableProps.style,
marginRight: tabMargin,
flexShrink: 0,
border: "1px solid " + Settings.theme.well,
}}
>
);
}