Files
docuseal/app/javascript/elements/files_list.js
T
Alex Turchyn 97c462ead2 initial commit
2023-06-01 00:00:58 +03:00

17 lines
422 B
JavaScript

import { actionable } from '@github/catalyst/lib/actionable'
import { targets, targetable } from '@github/catalyst/lib/targetable'
export default actionable(targetable(class extends HTMLElement {
static [targets.static] = [
'items'
]
add (e) {
const elem = document.createElement('input')
elem.value = e.detail.uuid
elem.name = `values[${this.dataset.fieldUuid}][]`
this.prepend(elem)
}
}))