From 719ce145e6203757dbee56e6cb97fa39ec5463fb Mon Sep 17 00:00:00 2001 From: drusepth Date: Fri, 15 Apr 2022 14:09:05 -0700 Subject: [PATCH] get first stimulusjs dropdown working --- app/javascript/controllers/index.js | 3 +++ app/views/content/index.html.erb | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/javascript/controllers/index.js b/app/javascript/controllers/index.js index b3131322..85d363dc 100644 --- a/app/javascript/controllers/index.js +++ b/app/javascript/controllers/index.js @@ -1,6 +1,9 @@ import { Application } from "stimulus" import { definitionsFromContext } from "stimulus/webpack-helpers" +import Dropdown from 'stimulus-dropdown' const application = Application.start() +application.register('dropdown', Dropdown) + const context = require.context(".", true, /\.js$/) application.load(definitionsFromContext(context)) \ No newline at end of file diff --git a/app/views/content/index.html.erb b/app/views/content/index.html.erb index a7af251b..b8966217 100644 --- a/app/views/content/index.html.erb +++ b/app/views/content/index.html.erb @@ -224,9 +224,9 @@
-
+
-