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 56b8643
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.2.5] - 2023-11-19
### Changed
* Added support for `dependsOn` to be used with the CKEditor4 field.

## [1.2.4] - 2023-10-18
### Fixed
* Fix formatting on the Detail View to prevent `whitespace-pre-wrap` class from being applied https://github.com/waynestate/nova-ckeditor4-field/pull/91
Expand Down
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 56b8643

Please sign in to comment.