Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added default valueMapper

  • Loading branch information...
commit 8e16fa30c2cad56cdc3dcd94cc08d121175d39ee 1 parent 44a21b9
Kristian Mandrup authored

Showing 2 changed files with 16 additions and 2 deletions. Show diff stats Hide diff stats

  1. +8 1 SliderFieldInput.js
  2. +8 1 SliderFieldText.js
9 SliderFieldInput.js
@@ -10,7 +10,14 @@ Ext.define('Ext.field.SliderInput', {
10 10 config: {
11 11 cls: Ext.baseCSSPrefix + 'slider-field-input',
12 12 tabIndex: -1,
13   - helperPosition: 'right'
  13 + helperPosition: 'right',
  14 + valueMapper: function(value) {
  15 + if (self.config.valueMap) {
  16 + self.config.valueMap[value];
  17 + } else {
  18 + value;
  19 + }
  20 + }
14 21 },
15 22
16 23 proxyConfig: {
9 SliderFieldText.js
@@ -9,7 +9,14 @@ Ext.define('Ext.field.SliderText', {
9 9 config: {
10 10 cls: Ext.baseCSSPrefix + 'slider-field-text',
11 11 tabIndex: -1,
12   - helperPosition: 'right'
  12 + helperPosition: 'right',
  13 + valueMapper: function(value) {
  14 + if (self.config.valueMap) {
  15 + self.config.valueMap[value];
  16 + } else {
  17 + value;
  18 + }
  19 + }
13 20 },
14 21
15 22 proxyConfig: {

0 comments on commit 8e16fa3

Please sign in to comment.
Something went wrong with that request. Please try again.