Skip to content

Text field suggestions generate data-list id duplication #6940

@kichetof

Description

@kichetof

Description:

Suggestions in Text field failed when you have fields with same name.
It should'nt happens, expect when you have some repeaters where attributes could have same name.

Issue come from vendor/laravel/nova/resources/js/mixins/FieldSuggestions.js:9

suggestionsId() {
      return `${this.fieldAttribute}-list`
    },

As suggestionsId use fieldAttribute, we encounter an id duplication.

Detailed steps to reproduce the issue on a fresh Nova installation:

  1. Click in User Name field, show suggestions (Name 1, Name 2)
Image
  1. add any Repeater (ex. Office Item), click in Office Item Repeater Name show suggestion (Office 1, Office 2)
Image
  1. add a new repeater or click in User Name and show suggestions (Office 1 instead of Name 1, ... or Desk 1, ...)
Image

Another point to enhance is the width of the dropdown menu of the repeater selector, w-fit or something else:

Image

Thansk a lot :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions