Skip to content

Commit

Permalink
clean up unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-yi37 committed Feb 10, 2025
1 parent 14c7aa3 commit 13ff0d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/components/form/multiple_select_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<div class="d-none"></div>
</template>

<template data-multiple-select-target="showAllOption">
<div class="fug d-flex align-items-baseline show-all-options" data-multiple-select-target="showAllOption" data-action="multiple-select#toggleSelectAll">
<template data-multiple-select-target="selectAllOption">
<div class="d-flex align-items-baseline">
<span class='mr-5'>DATA_LABEL</span>
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/controllers/multiple_select_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Controller } from '@hotwired/stimulus'
import TomSelect from 'tom-select'

export default class extends Controller {
static targets = ['select', 'option', 'item', 'hiddenItem', 'showAllOption']
static targets = ['select', 'option', 'item', 'hiddenItem', 'selectAllOption']
static values = {
options: Array,
selectedItems: Array,
Expand Down Expand Up @@ -40,7 +40,7 @@ export default class extends Controller {

const showAllOptionCheck = this.showAllOptionValue
const hiddenItemTemplate = showAllOptionCheck && this.hiddenItemTarget && this.hiddenItemTarget.innerHTML
const showAllOptionTemplate = showAllOptionCheck && this.showAllOptionTarget && this.showAllOptionTarget.innerHTML
const showAllOptionTemplate = showAllOptionCheck && this.selectAllOptionTarget && this.selectAllOptionTarget.innerHTML

// orderedOptionVals is of type (" " | number)[] - the " " could appear
// because using it as the value for the select/unselect all option
Expand Down

0 comments on commit 13ff0d1

Please sign in to comment.