mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
Ensure Listbox component doesnt crash if no children
This commit is contained in:
1 parent
d4871eb2d9
commit
b82edcac86
2 files changed
+2
-1
No files matched your search
@@ -151,7 +151,7 @@ function Listbox({
|
||||
/*
|
||||
* if no selected value (including a `defaultvalue`), then use first child
|
||||
*/
|
||||
setSelectedNode(content[0].props)
|
||||
setSelectedNode(content[0]?.props)
|
||||
return
|
||||
}
|
||||
}, [selected])
|
||||
|
||||
@@ -78,6 +78,7 @@ const AuthPoliciesPage: NextPageWithLayout = () => {
|
||||
return (
|
||||
<div className="flex flex-col h-full">
|
||||
<div className="mb-4">
|
||||
<Listbox size="small" label="test"></Listbox>
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center space-x-4">
|
||||
<div className="w-[230px]">
|
||||
|
||||
Reference in new issue
Block a user