creativetimofficial / ct-vue-argon-dashboard-pro

Vue Argon Dashboard Pro - Premium Bootstrap 5 Vuejs Admin Template
https://www.creative-tim.com/product/vue-argon-dashboard-pro
25 stars 7 forks source link

Tags input component should have a `placeholder` prop #9

Closed terion-name closed 5 years ago

terion-name commented 5 years ago

!!! IF YOU DO NOT USE THIS ISSUES TEAMPLATE, YOUR ISSUE IS LIABLE TO BEING IGNORED BY US

Prerequisites

Please answer the following questions for yourself before submitting an issue.

Expected Behavior

Tags input has placeholder

Current Behavior

It doesn't

Failure Information (for bugs)

n/a

Steps to Reproduce

n/a

Context

I wanted to make a PR, but in free version there is no tags input, so it seems to be only this place suitable.

Tags input component should have a placeholder prop:

props: {
    ...
    placeholder: {
      type: String,
      default: 'Add new tag',
      description: 'Placeholder for tag input'
    }
}

And tag input should:

<input type="text" :placeholder="placeholder" ... >

Because:

  1. You don't always add tags with it (keywords, for example)
  2. You don't always make it in English

Failure Logs

n/a

cristijora commented 5 years ago

Hey @terion-name Thanks for the feedback and for the help! We just changed the component a bit and improved it based on your feedback. In order for it to be more re-usable you can add this

<input v-bind="$attrs">

name: 'tags-input',
inheritAttrs: false,

This will make the component accept any native input properties like placeholder, type etc.

cristijora commented 5 years ago

Released v1.1.1 which contains this improvement