Skip to content

Commit

Permalink
fix: fix some demo bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
hperrin committed Mar 29, 2021
1 parent f24c25f commit f551776
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/list/List.svelte
Expand Up @@ -307,7 +307,7 @@
}
function getListItemIndex(element) {
const nearestParent = closest(el, '.mdc-list-item, .mdc-list');
const nearestParent = closest(element, '.mdc-list-item, .mdc-list');
// Get the index of the element if it is a list item.
if (nearestParent && matches(nearestParent, '.mdc-list-item')) {
Expand Down
2 changes: 1 addition & 1 deletion packages/list/Separator.svelte
Expand Up @@ -21,7 +21,7 @@
/>

<script>
import { createEventDispatcher } from 'svelte';
import { getContext, createEventDispatcher } from 'svelte';
import { forwardEventsBuilder, exclude } from '@smui/common/internal.js';
import Li from '@smui/common/Li.svelte';
import Hr from '@smui/common/Hr.svelte';
Expand Down
3 changes: 3 additions & 0 deletions packages/menu/Menu.svelte
@@ -1,4 +1,5 @@
<MenuSurface
bind:this={element}
use={[forwardEvents, ...use]}
class="mdc-menu {className}"
on:SMUI:menu-surface:mount={handleMenuSurfaceAccessor}
Expand Down Expand Up @@ -35,6 +36,7 @@
let className = '';
export { className as class };
let element;
let instance;
let menuSurfaceAccessor;
let listAccessor;
Expand Down Expand Up @@ -98,6 +100,7 @@
});
function handleMenuSurfaceAccessor(event) {
console.log('menu surface mount: ', event);
if (!menuSurfaceAccessor) {
menuSurfaceAccessor = event.detail;
}
Expand Down

0 comments on commit f551776

Please sign in to comment.