Skip to content

Autocomplete 'no results found' option #1763

@BorisKamp

Description

@BorisKamp

Hi guys!

Right now when you start typing, and no result is found, there is no feedback shown to the user. It would be nice if we could show a greyish label inside the <el-options> container with No results found for example?

Ideally we'd add a <no-results-placeholder> element inside the <el-options> element, so that we can style it ourselves. I've tried this a bit with a div inside like this:

           .......
            <div v-if="filteredItems.length === 0" class="relative cursor-pointer rounded-md select-none py-2 pl-3 flex items-center gap-2 text-gray-900 hover:bg-brandgreen hover:text-white aria-selected:bg-brandgreen aria-selected:text-white">
              {{ t('No options available') }}
            </div>
          </el-options>
        </el-autocomplete>

but that did not work.

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