diff --git a/src/Forms/Nouislider.php b/src/Forms/Nouislider.php index 214252d..929e250 100644 --- a/src/Forms/Nouislider.php +++ b/src/Forms/Nouislider.php @@ -58,6 +58,8 @@ class Nouislider extends Field implements Contracts\HasAffixActions */ protected $minValue = null; + protected bool | Closure | null $tooltips = false; + /** * @var view-string */ @@ -130,6 +132,13 @@ public function minValue($value): static return $this; } + public function tooltips($value = true): static + { + $this->tooltips = $value; + + return $this; + } + public function orientation($value) { $this->orientation = $value; @@ -163,6 +172,11 @@ public function getMinValue() return $this->evaluate($this->minValue); } + public function getTooltips() + { + return $this->evaluate($this->tooltips); + } + public function getSnap() { return $this->evaluate($this->snap); @@ -260,6 +274,7 @@ public function getOptions() 'animate' => $this->getAnimate(), 'animationDuration' => $this->getAnimationDuration(), 'cssPrefix' => $this->getCssPrefix(), + 'tooltips' => $this->getTooltips(), ]; } }