diff --git a/src/dropdown.ts b/src/dropdown.ts index 0956f33634..168cb2e7fc 100644 --- a/src/dropdown.ts +++ b/src/dropdown.ts @@ -641,7 +641,4 @@ export class Dropdown extends Component implements Openable { } } - static { - Dropdown._dropdowns = []; - } } diff --git a/src/global.ts b/src/global.ts index 9c292096a4..d53f897088 100644 --- a/src/global.ts +++ b/src/global.ts @@ -46,7 +46,7 @@ export class M { static Slider: typeof Slider = Slider; static Timepicker: typeof Timepicker = Timepicker; /** Creates a toast. */ - static toast: (opt: ToastOptions) => Toast = (opt) => new Toast(opt) ; + static toast: (opt: Partial) => Toast = (opt) => new Toast(opt) ; static Tooltip: typeof Tooltip = Tooltip; static Sidenav: typeof Sidenav = Sidenav; static TapTarget: typeof TapTarget = TapTarget; @@ -73,24 +73,24 @@ export class M { */ static AutoInit(context: HTMLElement = document.body) { let registry = { - Autocomplete: >context.querySelectorAll('.autocomplete:not(.no-autoinit)'), - Carousel: >context.querySelectorAll('.carousel:not(.no-autoinit)'), - Chips: >context.querySelectorAll('.chips:not(.no-autoinit)'), - Collapsible: >context.querySelectorAll('.collapsible:not(.no-autoinit)'), - Datepicker: >context.querySelectorAll('.datepicker:not(.no-autoinit)'), - Dropdown: >context.querySelectorAll('.dropdown-trigger:not(.no-autoinit)'), - Materialbox: >context.querySelectorAll('.materialboxed:not(.no-autoinit)'), - Modal: >context.querySelectorAll('.modal:not(.no-autoinit)'), - Parallax: >context.querySelectorAll('.parallax:not(.no-autoinit)'), - Pushpin: >context.querySelectorAll('.pushpin:not(.no-autoinit)'), - ScrollSpy: >context.querySelectorAll('.scrollspy:not(.no-autoinit)'), - FormSelect: >context.querySelectorAll('select:not(.no-autoinit)'), - Sidenav: >context.querySelectorAll('.sidenav:not(.no-autoinit)'), - Tabs: >context.querySelectorAll('.tabs:not(.no-autoinit)'), - TapTarget: >context.querySelectorAll('.tap-target:not(.no-autoinit)'), - Timepicker: >context.querySelectorAll('.timepicker:not(.no-autoinit)'), - Tooltip: >context.querySelectorAll('.tooltipped:not(.no-autoinit)'), - FloatingActionButton: >context.querySelectorAll('.fixed-action-btn:not(.no-autoinit)'), + Autocomplete: context.querySelectorAll('.autocomplete:not(.no-autoinit)'), + Carousel: context.querySelectorAll('.carousel:not(.no-autoinit)'), + Chips: context.querySelectorAll('.chips:not(.no-autoinit)'), + Collapsible: context.querySelectorAll('.collapsible:not(.no-autoinit)'), + Datepicker: context.querySelectorAll('.datepicker:not(.no-autoinit)'), + Dropdown: context.querySelectorAll('.dropdown-trigger:not(.no-autoinit)'), + Materialbox: context.querySelectorAll('.materialboxed:not(.no-autoinit)'), + Modal: context.querySelectorAll('.modal:not(.no-autoinit)'), + Parallax: context.querySelectorAll('.parallax:not(.no-autoinit)'), + Pushpin: context.querySelectorAll('.pushpin:not(.no-autoinit)'), + ScrollSpy: context.querySelectorAll('.scrollspy:not(.no-autoinit)'), + FormSelect: context.querySelectorAll('select:not(.no-autoinit)'), + Sidenav: context.querySelectorAll('.sidenav:not(.no-autoinit)'), + Tabs: context.querySelectorAll('.tabs:not(.no-autoinit)'), + TapTarget: context.querySelectorAll('.tap-target:not(.no-autoinit)'), + Timepicker: context.querySelectorAll('.timepicker:not(.no-autoinit)'), + Tooltip: context.querySelectorAll('.tooltipped:not(.no-autoinit)'), + FloatingActionButton: context.querySelectorAll('.fixed-action-btn:not(.no-autoinit)'), }; M.Autocomplete.init(registry.Autocomplete, {}); M.Carousel.init(registry.Carousel, {});