diff --git a/README.md b/README.md index 6309509..04c7fe7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ # label-edit +Component forked from https://www.npmjs.com/package/label-edit. + Click to show input text box Vue Component ... inspired by Trello. This is my first time publishing Vue Component via npm package and let me know if you encounter any issues, bugs, or improvement. Thanks! ## Installation @@ -11,7 +13,7 @@ import LabelEdit from 'label-edit' ``` ## Usage ```html - + ``` ### Definition @@ -22,6 +24,7 @@ import LabelEdit from 'label-edit' | v-on:text-updated-blur | callback function to capture the value changes of the input text when text lost its focus | | v-on:text-updated-enter | callback function to capture the value changes of the input text when user pressed enter | | placeholder | (optional) placeholder for empty label edit value | +| :object-id | identificator of label edit, which is passed to "on-updated" callback | ## Example @@ -29,7 +32,7 @@ import LabelEdit from 'label-edit' ``` @@ -48,8 +51,9 @@ export default { LabelEdit, }, methods: { - textUpdated: function(text){ + textUpdated: function(text, objectId){ this.text = text; + //save(text, objectId) }, } } @@ -61,4 +65,4 @@ export default { ### References -[demo]: https://media.giphy.com/media/PMUxyTGtLN8csmXxFm/giphy.gif \ No newline at end of file +[demo]: https://media.giphy.com/media/PMUxyTGtLN8csmXxFm/giphy.gif diff --git a/package.json b/package.json index 8eb4f7a..3f2f815 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "label-edit", - "version": "0.2.0", + "name": "mhucik-label-edit", + "version": "0.2.1", "description": "Click to show input text box Vue Component ... inspired by Trello", "main": "dist/vue-label-edit.js", "scripts": { @@ -17,7 +17,7 @@ "vuejs", "vuejs2" ], - "author": "Myo Kyaw Htun", + "author": "Myo Kyaw Htun & Marek Hučík", "license": "MIT", "bugs": { "url": "https://github.com/mhucik/label-edit/issues" @@ -42,6 +42,6 @@ }, "devDependencies": { "serviceworker-webpack-plugin": "^1.0.0-alpha02", - "webpack-cli": "^3.3.5" + "webpack-cli": "^3.3.5" } }