Skip to content

Commit

Permalink
add support for DependentFormFields
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispelzer committed Nov 19, 2023
1 parent 8fd6390 commit 5f149e5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions dist/js/field.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/

/*!
* vuex v4.1.0
* (c) 2022 Evan You
* @license MIT
*/

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
Expand Down
6 changes: 3 additions & 3 deletions resources/js/components/FormField.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<DefaultField :field="field" :errors="errors" :show-help-text="showHelpText">
<DefaultField :field="currentField" :errors="errors" :show-help-text="showHelpText">
<template #field>
<ckeditor
:id="field.attribute"
Expand All @@ -12,10 +12,10 @@


<script>
import { FormField, HandlesValidationErrors } from 'laravel-nova'
import { DependentFormField, HandlesValidationErrors } from 'laravel-nova'
export default {
mixins: [FormField, HandlesValidationErrors],
mixins: [DependentFormField, HandlesValidationErrors],
props: ['resourceName', 'resourceId', 'field'],
Expand Down
3 changes: 2 additions & 1 deletion src/CKEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Waynestate\Nova\CKEditor4Field;

use Laravel\Nova\Fields\SupportsDependentFields;
use Waynestate\Nova\CKEditor4Field\Handlers\DiscardPendingAttachments;
use Waynestate\Nova\CKEditor4Field\Handlers\StorePendingAttachment;
use Waynestate\Nova\CKEditor4Field\Models\DeleteAttachments;
Expand All @@ -12,7 +13,7 @@

class CKEditor extends Trix
{
use Expandable;
use Expandable, SupportsDependentFields;

/**
* The field's component.
Expand Down

0 comments on commit 5f149e5

Please sign in to comment.