Skip to content

Commit

Permalink
Reimplement command component
Browse files Browse the repository at this point in the history
  • Loading branch information
lazaronixon committed Jan 9, 2025
1 parent 955f519 commit 2e76fc5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 80 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## [Unreleased]
- Reimplement command component

## [0.0.82] - 2024-01-08
- Improve prose
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/css_zero/add/resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ combobox:
command:
- app/assets/stylesheets/command.css
- app/javascript/controllers/filter_controller.js
- app/javascript/controllers/list_controller.js
- app/javascript/controllers/listbox_controller.js
- app/assets/images/search.svg
collapsible:
- app/javascript/controllers/collapsible_controller.js
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Controller } from "@hotwired/stimulus"
import Listbox from "https://cdn.skypack.dev/@github/[email protected]?min"

export default class extends Controller {
static targets = [ "input", "list" ]

connect() {
this.listbox = new Listbox(this.inputTarget, this.listTarget)
}

disconnect() {
this.listbox.destroy()
}

start() {
this.listbox.start()
}

stop() {
this.listbox.stop()
}
}

0 comments on commit 2e76fc5

Please sign in to comment.