Skip to content

Selected item slot for Select component #223

@ayZagen

Description

@ayZagen

This function solves the problem

It would be great to have selected-item(or any other name) slot to improve customization of selected value.

Expected API

Also instead of render-label property, it would be great to have scoped slot as I think it is more suitable for Vue. Having prop to customize render is kind of React thing.

<template>
<n-select :options="options" >
  <template #selected-item="{ item }">
    {{item.label}} - {{item.value}} 
  </template>
  <template #option="{ item }">
    This is {{item.label}}
  </template>
</n-select>
</template>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions