More fixes

This commit is contained in:
Gregory Schier
2026-03-13 08:29:36 -07:00
parent 44a331929f
commit 21f775741a
3 changed files with 7 additions and 5 deletions

View File

@@ -55,7 +55,8 @@ async function op(
}
}
return { client: _clients[hash], clientHash: hash };
// oxlint-disable-next-line no-non-null-assertion
return { client: _clients[hash]!, clientHash: hash };
}
async function getValue(

View File

@@ -146,7 +146,7 @@ export const GraphQLDocsExplorer = memo(function GraphQLDocsExplorer({
</div>
) : (
<div
key={activeItem.type.name} // Reset scroll position to top
key={'name' in activeItem.type ? activeItem.type.name : String(activeItem.type)} // Reset scroll position to top
className="overflow-y-auto h-full w-full p-3 grid grid-cols-[minmax(0,1fr)]"
>
<GqlTypeInfo item={activeItem} setItem={setActiveItem} schema={schema} />
@@ -202,7 +202,7 @@ function GraphQLExplorerHeader({
})}
</div>
<GqlSchemaSearch
key={item?.type.name} // Force reset when changing items
key={item != null && 'name' in item.type ? item.type.name : 'search'} // Force reset when changing items
maxHeight={containerHeight}
currentItem={item}
schema={schema}
@@ -798,7 +798,7 @@ function GqlSchemaSearch({
label="search"
hideLabel
defaultValue={value}
placeholder={focused ? `Search ${currentItem != null ? currentItem.type.name : 'Schema'}` : 'Search'}
placeholder={focused ? `Search ${currentItem != null && 'name' in currentItem.type ? currentItem.type.name : 'Schema'}` : 'Search'}
leftSlot={
<div className="w-10 flex justify-center items-center">
<Icon size="sm" icon="search" color="secondary" />

View File

@@ -17,5 +17,6 @@
"noEmit": true,
"jsx": "react-jsx",
"types": ["node"]
}
},
"exclude": ["flatpak", "npm", "crates/yaak-templates/pkg"]
}