Skip to content

Requisition change focus can be confusing #3878

Open
@Chris-Petty

Description

@Chris-Petty

Describe the bug

When editing request quantity in a row, after pressing enter/next it scrolls instantaneously to the next row/cell. It can look like the value you edited is being saved to the row above, confusing the user.

To reproduce

Steps to reproduce the behavior:

  1. New supplier requisition
  2. Edit quantity
  3. Press enter/next whatever the device keyboard says
  4. Possible be confused if you're not familiar

Expected behaviour

Should have some smoothing animation (easing? idk the jargon) to indicate that the view port has scrolled I think?

It's possible the lenovo was being sad and laggy. But most of the UI seems responsive enough.

Proposed Solution

@joshxg knows how to use animations in react. That said, there is a chance that there is a prop on flatlist for handling this.

I could not help myself, I looked at the docs. There is a parameter in the flat list scroll methods to animate the scrolling. Hopefully that's on...

I could not help myself and looked at the code. Probably just need to add that parameter to this call of scrollToIndex:

https://github.com/openmsupply/mobile/blob/d50346c2688f5e77a8013b090cdce6d45e68c0e6/src/widgets/DataTable/DataTable.js#L86-L89
😃

Version and device info

  • App version: 7.0.um
  • Tablet model: Lenovo tab that we recently sold out of
  • OS version: Android...

Additional context

I wasn't the only user that got confused.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions