Skip to content

v0.5.11

Compare
Choose a tag to compare
@github-actions github-actions released this 23 Jan 09:57
  • Fix storing extra fields on the Link field correctly for multiple links.

  • In conditional configuration functions it's now possible to access fields from
    parent contexts. For example field options of a nested field inside a List
    field can depend on the value of a field in the entry root.

    const innerField = alinea.text('Read-only if status is published')
    const Type = alinea.type('Conditional example', {
      status: alinea.select('Status', {
        draft: 'Draft',
        published: 'Published'
      }),
      list: alinea.list('List', {
        schema: {ListRow: alinea.type({innerField})}
      })
    })
    alinea.track.options(innerField, get => {
      return {readOnly: get(Type.status) === 'published'}
    })