jqh 4 years ago
parent
commit
3319c81003
2 changed files with 17 additions and 1 deletions
  1. 9 1
      src/Form/Field.php
  2. 8 0
      src/Form/Field/SelectTable.php

+ 9 - 1
src/Form/Field.php

@@ -821,7 +821,7 @@ class Field implements Renderable
     public function placeholder($placeholder = null)
     {
         if ($placeholder === null) {
-            return $this->placeholder ?: trans('admin.input').' '.$this->label;
+            return $this->placeholder ?: $this->defaultPlaceholder();
         }
 
         $this->placeholder = $placeholder;
@@ -829,6 +829,14 @@ class Field implements Renderable
         return $this;
     }
 
+    /**
+     * @return string
+     */
+    protected function defaultPlaceholder()
+    {
+        return trans('admin.input').' '.$this->label;
+    }
+
     /**
      * @param mixed $value
      *

+ 8 - 0
src/Form/Field/SelectTable.php

@@ -145,6 +145,14 @@ class SelectTable extends Field
         $this->options = $values;
     }
 
+    /**
+     * @return string
+     */
+    protected function defaultPlaceholder()
+    {
+        return trans('admin.choose').' '.$this->label;
+    }
+
     protected function setUpTable()
     {
         $this->dialog