-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add quick select list options #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: amliu/navigation1
Are you sure you want to change the base?
Conversation
c1ee50c
to
784a87e
Compare
src/features/SlotDetails/index.tsx
Outdated
|
||
return ( | ||
<Flex direction="column" flexGrow="1" flexShrink="1" height="100%"> | ||
<Flex direction="column" height="100%"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't need to be flex, can just be a div or Box with height: 100%
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using flex here to center the slot search vertically on the page. I can take off the direction since it isn't being used though.
|
||
return ( | ||
<Flex direction="column" gap="2" flexGrow="1" flexShrink="1"> | ||
<Flex direction="column" gap="2" width="100%"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to be fine without this width 100% too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the width 100%, the slot content doesn't fill the whole outlet for wider screens
|
||
return ( | ||
<Grid | ||
width="100%" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unneeded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without width 100%, the grid will just use the maxWidth and not wrap when the container becomes too narrow to fully fit the columns
useEffect(() => { | ||
if (selectedSlot === undefined) setSearchSlot(""); | ||
else setSearchSlot(String(selectedSlot)); | ||
}, [selectedSlot]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useEffect
seems unnecessary? Think you can just init searchSlot
state from selectedSlot
const [searchSlot, setSearchSlot] = useState(() =>
selectedSlot ? String(selectedSlot) : "",
);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to use selectedSlot === undefined ? "" : String(selectedSlot)
since technically selectedSlot can be 0
784a87e
to
13466fc
Compare
No description provided.