Results 1 to 5 of 5

Thread: SpinnerFiled has strange behaviour when click up arrow

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Oct 2011
    Location
    Trieste, italy
    Posts
    33

    Default SpinnerFiled has strange behaviour when click up arrow

    When run the SpinnerField example from documentation page and click with mouse the up arrow multiple times the number doesn't increment but character "1" being simply added to the string. Example: if you click three times cannot obtain 3 but 111.
    If you use keyboard keys works well.

  2. #2
    Sencha User Mark.Brocato's Avatar
    Join Date
    Mar 2015
    Location
    Maryland
    Posts
    482

    Default

    Strange... I cannot reproduce that. What browser/version/OS are you using?

  3. #3
    Ext JS Premium Member
    Join Date
    Oct 2011
    Location
    Trieste, italy
    Posts
    33

    Default

    Hi Mark,
    I'm using Ubuntu 14.04 and Firefox 54 or Chrome 53.
    You can reproduce that behaviour in http://docs.sencha.com/extreact/6.5.0/modern/Ext.field.Spinner.html
    If I use that component in my application it works as in documentation example.
    Otherwise in the Kitchen Sink works well.

  4. #4
    Sencha User Mark.Brocato's Avatar
    Join Date
    Mar 2015
    Location
    Maryland
    Posts
    482

    Default

    I see, there is a bug in the example. The minValue, maxValue, and stepValue props should have numeric values, not strings. I will open up a ticket to fix the example.

    Here is the correct code:

    Code:
    import React, { Component } from 'react';
    import { Container, SpinnerField, FormPanel } from '@extjs/ext-react';
    
    
    export default class MyExample extends Component {
        render() {
            return (
                <Container layout="center">
                    <FormPanel shadow>
                        <SpinnerField
                            label="Spinner"
                            width="150"
                            minValue={0}
                            maxValue={10}
                            stepValue={1}
                        />
                    </FormPanel>
                </Container>
            )
        }
    }

  5. #5
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,425

    Default

    Why the component is not coercing string configs to number in this case?

    I created a feature request.

Similar Threads

  1. Ext.Img strange behaviour
    By Biohazard in forum Ext: Discussion
    Replies: 4
    Last Post: 4 Mar 2012, 7:26 AM
  2. Ext.ux.DDView, strange behaviour
    By iBeb in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 11 Dec 2008, 2:09 AM
  3. Replies: 0
    Last Post: 4 Jun 2008, 1:52 AM
  4. Replies: 2
    Last Post: 8 Jun 2007, 10:50 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
  •