Skip to content

Commit

Permalink
The event now uses the attribute name instead of the actual name of t…
Browse files Browse the repository at this point in the history
…he input field
  • Loading branch information
benjaminhirsch committed Apr 21, 2019
1 parent d459734 commit 69ff05a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/js/components/Slug/FormField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default {
* Mount the component.
*/
mounted() {
Nova.$on('field-update-' + this.field.name, ({value}) => {
Nova.$on('field-update-' + this.field.attribute, ({value}) => {
if (this.field.disableAutoUpdateWhenUpdating === false) {
this.value = slugify(value, this.field.slugifyOptions || {});
}
Expand Down
2 changes: 1 addition & 1 deletion src/TextWithSlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TextWithSlug extends Text
*
* @return $this
*/
public function slug($slugField = 'Slug'): Element
public function slug($slugField = 'slug'): Element
{
return $this->withMeta([__FUNCTION__ => $slugField]);
}
Expand Down

0 comments on commit 69ff05a

Please sign in to comment.