From a4178fc5fcad3d1debc59482a57ce2594571fd62 Mon Sep 17 00:00:00 2001 From: Keval Bhatt Date: Sat, 6 Jan 2018 17:38:42 +0530 Subject: [PATCH 1/2] Support added for placeholder and empty text --- examples/App.jsx | 4 ++++ libs/js/Editable.jsx | 11 ++++++----- libs/js/Select.jsx | 6 +++++- libs/js/Text.jsx | 6 +++++- libs/js/Textarea.jsx | 6 +++++- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/examples/App.jsx b/examples/App.jsx index e6e6a58..2931557 100644 --- a/examples/App.jsx +++ b/examples/App.jsx @@ -107,6 +107,8 @@ export default class App extends Component { title="Enter username" placement="right" showButtons={true} + emptyValueText="Enter Text" + placeholder="Field is required" validate={(value) => { if(!value){ return 'Required'; @@ -145,6 +147,8 @@ export default class App extends Component { mode={"popup"} title="Enter description" placement="right" + emptyValueText="Enter Text" + placeholder="Enter text in textarea" showButtons={true} /> diff --git a/libs/js/Editable.jsx b/libs/js/Editable.jsx index a99e849..e5ffa0a 100644 --- a/libs/js/Editable.jsx +++ b/libs/js/Editable.jsx @@ -160,19 +160,19 @@ export default class Editable extends Component { value: this.value || defaultValue , onSubmit: this.onSubmit.bind(this), setEditable: this.setEditable.bind(this), - validation: this.validation, + validation: this.validation }; const content = []; if (editable) { switch (dataType) { case 'text': - content.push(); + content.push(); break; case 'textarea': - content.push(