Skip to content

Commit

Permalink
pkp#9857 Add step prop and allow float for min&max&step
Browse files Browse the repository at this point in the history
  • Loading branch information
jardakotesovec committed Apr 9, 2024
1 parent 9665558 commit 94229ac
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions classes/components/forms/FieldSlider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,24 @@ class FieldSlider extends Field

/**
* Range min value
*
* @var int|float
*/
public int $min;
public $min;

/**
* Range max value
*
* @var int|float
*/
public int $max;
public $max;

/**
* Range step value
*
* @var int|float
*/
public $step = 1;

/**
* Label for min value, it displays actual value when not present
Expand Down Expand Up @@ -66,6 +77,7 @@ public function getConfig()
$config = parent::getConfig();
$config['min'] = $this->min;
$config['max'] = $this->max;
$config['step'] = $this->step;
$config['minLabel'] = $this->minLabel;
$config['maxLabel'] = $this->maxLabel;
$config['valueLabel'] = $this->valueLabel;
Expand Down

0 comments on commit 94229ac

Please sign in to comment.