-
Notifications
You must be signed in to change notification settings - Fork 6
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
[Feature] Select component for Codex UI #279
base: main
Are you sure you want to change the base?
Conversation
Added Dropdown component implementation, but in component only one option is selectable. Also updated icons package version in package json's
> | ||
{{ activeItem.title }} | ||
</Button> | ||
<div :style="showPopover ? {'display' : 'block'} : {'display': 'none'}"> |
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.
use the Popover component as a wrapper
why file in |
Changed Component's name from Select to Dropdown; Converting options list into Popover component
&__btn { | ||
user-select: none; | ||
background-color: var(--base--bg-secondary); | ||
margin-bottom: var(--spacing-s); | ||
padding-right: var(--spacing-s); | ||
} |
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 redundant
&__btn:hover { | ||
background-color: var(--base--bg-secondary-hover); | ||
cursor: pointer; | ||
} | ||
} |
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.
same
codex-ui/dev/routes.ts
Outdated
path: '/components/dropdown', | ||
component: Dropdown as Component, |
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.
why select component is removed? you need to add new dropdown component, not to override select
if (item.type === 'default' || !item.type) { | ||
activeItem.value = Object.create(item); | ||
// eslint-disable-next-line no-console | ||
activeItem.value.onActivate = console.log; |
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.
onActivate will recieve no parameters, so logs would be empty.
Anyway, i think, that this loggs are unneeded in app, where this component would be used
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.
also this works wrong:
- If i open popover by pressing dropdown button, then isOpened becomes
true
- Then i select any option in context menu, popover becomes hidden, and title of the button updates
- If i press popover button one more time it makes isOpened
false
and nothing changes on page (i expect popover to be opened again)
so we should manually hide()
popover, when new item selected or popover closed by pressing anywhere else
Popover component's logic changed
There was some mess with component's name, because Dropdown and Select lots in common, so now this is Select component Also added ability to toggle select by clicking on selection button
Added Dropdown component implementation (#273), but in component only one option is selectable. Also updated icons package version in package json's