Coder Social home page Coder Social logo

Comments (6)

raveclassic avatar raveclassic commented on August 26, 2024 1

Looks like the issue is relevant because such behavior does describe what a numeric stepper should actually do, not a numeric input. Moreover I would expect top/bottom arrows to also work incrementing/decrementing the digit at the current caret position.
Reopening.

from dx-platform.

sutarmin avatar sutarmin commented on August 26, 2024

It's default React behavior, details here: facebook/react#955 (comment) . I don't think we should track cursor position manually until we have it as a requirement :)

from dx-platform.

raveclassic avatar raveclassic commented on August 26, 2024

NS should support 2 editing modes: one is full-editing which is enabled for integers and for floats to left from the point .. And other is overwrite with tracking of caret position which is enabled for floats to the right from the point ..
Delete/Backspace should behave differently - erase digits (usual behavior) on the left and reset to 0 on the right (amount of zero symbols should be controlled by precision property).

from dx-platform.

raveclassic avatar raveclassic commented on August 26, 2024

NS should drop the formatter property because it is out of scope of editing numbers and may lead to value inconsistencies, for example it may insert additional .. Instead we should use some predefined config like the one from accounting.js (except arbitrary templates).

from dx-platform.

raveclassic avatar raveclassic commented on August 26, 2024

/cc @mankdev @sutarmin

from dx-platform.

raveclassic avatar raveclassic commented on August 26, 2024

I'd also suggest to replace underlying input[type=text] component with a custom control with full support for numeric keys as well as control keys. Caret should be simulated like it's done in DateInput/TimeInput.

from dx-platform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.