extendLabel.ts 384 B

123456789101112131415
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import extendSchemaDefinition from '#shared/form/utils/extendSchemaDefinition.ts'
  3. import type { FormKitNode } from '@formkit/core'
  4. const extendLabel = (node: FormKitNode) => {
  5. extendSchemaDefinition(node, 'label', {
  6. attrs: {
  7. id: '$: "label-" + $id',
  8. },
  9. })
  10. }
  11. export default extendLabel