Results 1 to 9 of 9

Thread: Spinner field in CLASSIC toolkit doesn't work

  1. #1
    Sencha User
    Join Date
    Nov 2013
    Location
    Spain
    Posts
    26

    Default Answered: Spinner field in CLASSIC toolkit doesn't work

    Hi,

    I've found that is not possible create a spinner field in any CLASSIC toolkit. In fiddle stays "Running" and in my proyect the spin buttons don't increase or decrease the value, the control freezes

    Do you know de reason? In MODERN toolkit works fine

    Code:
    {
         xtype: 'spinnerfield',
         label: 'Label',
         value: 2,
         stepValue: 1,
         minValue: 0,
         maxValue: 100
    }
    https://fiddle.sencha.com/#view/editor&fiddle/1lip

  2. You have to use numberfield.

  3. #2
    Sencha User
    Join Date
    Nov 2013
    Location
    Spain
    Posts
    26

    Default

    I've updated the fiddle and as you can see the spin field has two bugs:
    - Spin buttons don't increase or decrease the value
    - Allow enter not numeric characters

  4. #3
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256
    Answers
    759

    Default

    Check out the docs, it's intended to be an abstract class: http://docs.sencha.com/extjs/6.2.1/c...d.Spinner.html
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  5. #4
    Sencha User
    Join Date
    Apr 2013
    Posts
    913
    Answers
    105

    Default

    You have to use numberfield.

  6. #5
    Sencha User
    Join Date
    Nov 2013
    Location
    Spain
    Posts
    26

    Default

    evant, I didn't know it was an abstract class. I think it's a very complex way to implement a simple spin field

    Hakimio, your solution works for me

  7. #6
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256
    Answers
    759

    Default

    It's the first thing it says in the docs:

    A field with a pair of up/down spinner buttons. This class is not normally instantiated directly, instead it is subclassed and the onSpinUp and onSpinDown methods are implemented to handle when the buttons are clicked. A good example of this is the Ext.form.field.Number field which uses the spinner to increment and decrement the field's value by its step config value.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  8. #7
    Sencha User
    Join Date
    Nov 2013
    Location
    Spain
    Posts
    26

    Default

    Ok, but "This class is not normally instantiated" does not mean it's mandatory. The normal implementation for simple integer spin control can't be a subclassed control

    It's only my opinion

  9. #8
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256
    Answers
    759

    Default

    Not sure why you downvoted my posts there, I guess I should keep quiet
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  10. #9
    Sencha User
    Join Date
    Nov 2013
    Location
    Spain
    Posts
    26

    Default

    My pulse is shaking and I do not know where I click

Similar Threads

  1. Replies: 6
    Last Post: 4 May 2016, 9:43 PM
  2. Replies: 1
    Last Post: 15 Sep 2015, 11:12 AM
  3. How to use classic toolkit in tablet
    By alfa19 in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 6 Jul 2015, 6:44 AM
  4. Override field Spinner doesn't work on production app
    By davide.peri in forum Sencha Architect 3.x: Bugs
    Replies: 1
    Last Post: 29 Jan 2015, 11:57 AM
  5. [OPEN-597] Spinner field: Drag does not work in window
    By stephen.friedrich in forum Ext 3.x: Bugs
    Replies: 0
    Last Post: 18 Feb 2010, 7:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •