-
Notifications
You must be signed in to change notification settings - Fork 75
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
Component: Dropdown #6
Comments
Proposed component structure, looking for feedback, some q's.
|
@macandcheese this looks good to me. I'm assuming this would follow these designs: I do have 2 questions:
I can't really see anyone needing multiple active items in a single group but if there is a valid use case I don't see why not. One last thing (I keep thinking of stuff) it would be useful to customize the appearance of the button via a <calcite-dropdown>
<button slot="button" class="btn btn-small btn-white">Dropdown Menu</button>
<calcite-dropdown-group label="Group 1">
<calcite-dropdown-item>Foo</calcite-dropdown-item>
<calcite-dropdown-item active>Baz</calcite-dropdown-item>
<calcite-dropdown-item>Bar</calcite-dropdown-item>
</calcite-dropdown-group>
<calcite-dropdown-group label="Group 1">
<calcite-dropdown-item>Zip</calcite-dropdown-item>
<calcite-dropdown-item active>Zap</calcite-dropdown-item>
</calcite-dropdown-group>
</calcite-dropdown> |
Yep! It was actually already added in CW2.0 branch, https://github.com/Esri/calcite-web/blob/2.0/lib/sass/calcite-web/components/_dropdown.scss, just going to port over and add the dark theme variant.
Yeah, totally. I had just imagined that being a wrapper in the case where there ARE more than one group - mostly for emitting a containing group ID. I'll make it work without as well.
Makes sense, I'm always in favor of "locking down" as much as possible to prevent folks from putting not... good looking stuff in, ha.
Yeah I think thats useful here, as well in other components potentially. Could be something set globally (and still explicitly override-able) alongside theme - for VTSE or other 'dense' apps. Maybe some adjustments to font-size and the $baseline padding variable could work.
Hm, that would make a better case for using "super multi select" vs. here, where a click would "deselect" all other items in the group. Open to discussion on that.
I think the invoking element is actually outside the scope of dropdown component itself? ie...
|
<button class="btn" onclick="document.querySelector('#dropdown-one').toggleCalciteDropdown()">
Dropdown Menu
</button>
<calcite-dropdown id='#dropdown-one'>
...
</calcite-dropdown> I have 2 problems with this code snippet:
|
That's fair - I'll update to use a slot for the invoking element. |
PR in - #96 |
Esri/calcite-web#1021 and Esri/calcite-web#1017.
Also See: https://ionicframework.com/docs/api/select
The text was updated successfully, but these errors were encountered: