Skip to content

auto focus false not working #90

@Deboracgs

Description

@Deboracgs

Auto focus false not working, when i click in other input, scrolling automaticaly to currencyInput, any solution ?

https://media.giphy.com/media/1mssFMXlG3mORJt03j/giphy.gif

import React, { Component } from 'react';
import CurrencyInput from 'react-currency-input';
class InputMoneyComponent extends Component {

    constructor(props){
        super(props);

        this.input;
    }

    handleChange(event){
        event.preventDefault();
        let value = event.target.value;
        this.props.onChange(value);
    };


    render() {
        const { classes } = this.props;
        return (
            <CurrencyInput 
                className={"form-control"}
                value={this.props.value}
                disabled={this.props.disabled}
                onChangeEvent={this.handleChange.bind(this)}
                thousandSeparator={"."}
                decimalSeparator={","}
                allowNegative={false}
                ref={ref => this.input = ref }
                inputType={"text"}
                autoFocus={false}
            />
        );
    }
}
export default (InputMoneyComponent);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions