fixedLeftColumns is not reflecting using DataTable2 (Tested on web)
- Dominant language
- Dart
- Stars
- 7.6k
- Forks
- 2k
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
I have set fixedLeftColumns to 2, which should make 2 most left columns sticky. But its not working. Even tried with 1 and other number and no result. Although fixedTopRows seems to be working fine.
**To Reproduce**
Here is the example code to reproduce.
```
DataTable2(
columnSpacing: 12,
horizontalMargin: 12,
lmRatio: 2.5,
fixedLeftColumns: 2,
isHorizontalScrollBarVisible: true,
columns: [
DataColumn2(size: ColumnSize.S, label: BodyLargeText('Index')),
DataColumn2(size: ColumnSize.L, label: BodyLargeText('Name')),
DataColumn2(size: ColumnSize.L, label: BodyLargeText('Email')),
],
rows: List.generate(
5,
(index) => DataRow(cells: [
DataCell(BodyLargeText('${index+1}')),
DataCell(BodyLargeText('Name ${index+1}')),
DataCell(BodyLargeText('Email ${index+1}')),
])),
),
```
**Screenshots**
**Versions**
fl_chart version: fl_chart: ^0.68.0
**Flutter doctor**
[✓] Flutter (Channel stable, 3.19.0, on macOS 14.5 23F79 darwin-arm64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.90.0)
[✓] Connected device (4 available)
[✓] Network resources
Contributor guide
Research direction
Start with the provided DataTable2 example and reproduce it on Flutter web, using fixedLeftColumns: 2 and the working fixedTopRows behavior as a comparison. Trace the DataTable2 implementation responsible for horizontal scrolling and column positioning. Done means the requested number of left columns remains visible while horizontally scrolling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100