Skip to content

Cannot scroll in DataTable documentation example #112755

Description

@jibbers42

The example has 10 rows, but you can't scroll to the rows out of view. Scrolling isn't the point of the example, but there are rows out of view and showing scrolling would be helpful for less experienced users.

https://api.flutter.dev/flutter/material/DataTable-class.html#material.DataTable.2

Activity

  1. added
    in triagePresently being triaged by the triage team
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    d: api docsIssues with https://api.flutter.dev/
    and removed
    in triagePresently being triaged by the triage team
    on Oct 3, 2022
  2. ferndot commented on Oct 10, 2022

    @ferndot

    I have a proposed fix for this over in #113194

  3. mr-rsr commented on Jan 22, 2023

    @mr-rsr

    Can i fix this issue

  4. 1 remaining item

  5. Chinmay-KB commented on Jul 25, 2023

    @Chinmay-KB
    Contributor

    I would like to work on this. I understand this PR just requires some tests or is there something more to do as well?

  6. TahaTesser commented on Jul 25, 2023

    @TahaTesser
    Contributor

    Take a look at #113194. Just need a small test to check datatable is scrollable and the fix should be good to go.

  7. Chinmay-KB commented on Jul 25, 2023

    @Chinmay-KB
    Contributor

    So it's just a test which does drag + checks if the item below are visible? Or something more too?

  8. TahaTesser commented on Jul 27, 2023

    @TahaTesser
    Contributor

    So it's just a test which does drag + checks if the item below are visible? Or something more too?

    Yes, just scroll to update the visible items. We'll also need to document the performance implications of SinglleChildScrollView with DataTable. If you're not sure, I can find another issue for you.

  9. Chinmay-KB commented on Jul 28, 2023

    @Chinmay-KB
    Contributor

    Any place you would suggest me to figure out the performance implications? I'd like to dig through it instead of an easier bug @TahaTesser

  10. TahaTesser commented on Jul 28, 2023

    @TahaTesser
    Contributor

    Any place you would suggest me to figure out the performance implications? I'd like to dig through it instead of an easier bug @TahaTesser

    Look at the "Performance considerations" section at https://master-api.flutter.dev/flutter/material/ListTile-class.html.

    We just need a similar description for using SingleChildScrollView on a DataTable with a large number of rows. No extra code example is needed.

    cc: @Piinks

  11. Chinmay-KB commented on Jul 29, 2023

    @Chinmay-KB
    Contributor

    I am working on the test. One issue I faced is that because the list is too small, all the items are already visible on the screen.So the initial assertion of first item being visible and last not being visible cannot be made. I can either

    • Increase the list count (Works with list size 20)
    • Set a surface size for the test to run
      What should be the approach here?

    I am proceeding with increasing the list count for now, will change if necessary

  12. anirudh-hegde commented on Aug 15, 2023

    @anirudh-hegde

    Hey,
    I am interested to solve this. Can you please assign me this task?

  13. TahaTesser commented on Aug 15, 2023

    @TahaTesser
    Contributor

    @Anianonymous

    Please see the linked PR above , this is being fixed.

    You can search for similar issues in the Flutter repository.

  14. anirudh-hegde commented on Aug 15, 2023

    @anirudh-hegde

    The example has 10 rows, but you can't scroll to the rows out of view. Scrolling isn't the point of the example, but there are rows out of view and showing scrolling would be helpful for less experienced users.

    https://api.flutter.dev/flutter/material/DataTable-class.html#material.DataTable.2

    https://api.flutter.dev/flutter/material/DataTable-class.html#material.DataTable.2
    I initialized value as numItems as 100 I can scroll down easily and I wrapped the SizedBox with SingleChildScrollView.
    I hope that I've solved your issue @jibbers42

  15. github-actions commented on Sep 26, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  16. locked as resolved and limited conversation to collaborators on Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

d: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions