bosskmk / pluto_grid

PlutoGrid is a dataGrid for flutter that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.
https://pluto.weblaze.dev
MIT License
662 stars 302 forks source link

[Bug] No ui feedback when pressing enter when editing cell in last row #1090

Closed satvikreddy closed 5 days ago

satvikreddy commented 1 month ago

Steps to reproduce the bug

  1. Edit any cell in last row
  2. Press enter key

Expected results

When clicking enter in cell edit mode on last row, cell should come out of editing mode. Otherwise, user will not know that value was saved successfully.

Actual results

https://github.com/user-attachments/assets/f166bbe8-b6a2-4eb2-9e0c-343e209bfc25

Code sample

import 'package:flutter/material.dart';
import 'package:pluto_grid/pluto_grid.dart';

void main() {
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Column(
          children: [
            Text('Grid!'),
            Expanded(
              child: Grid(),
            ),
          ],
        ),
      ),
    );
  }
}

class Grid extends StatefulWidget {
  const Grid({super.key});

  @override
  State<Grid> createState() => _GridState();
}

class _GridState extends State<Grid> {
  @override
  Widget build(BuildContext context) {
    return PlutoGrid(
      columns: [
        PlutoColumn(
          title: 'Column A',
          field: 'column_a',
          type: PlutoColumnType.text(),
        ),
        PlutoColumn(
          title: 'Column B',
          field: 'column_b',
          type: PlutoColumnType.text(),
        ),
        PlutoColumn(
          title: 'Column C',
          field: 'column_c',
          type: PlutoColumnType.text(),
        ),
      ],
      rows: [
        PlutoRow(cells: {
          'column_a': PlutoCell(value: 'A1'),
          'column_b': PlutoCell(value: 'B1'),
          'column_c': PlutoCell(value: 'C1'),
        }),
        PlutoRow(cells: {
          'column_a': PlutoCell(value: 'A2'),
          'column_b': PlutoCell(value: 'B2'),
          'column_c': PlutoCell(value: 'C2'),
        }),
        PlutoRow(cells: {
          'column_a': PlutoCell(value: 'A3'),
          'column_b': PlutoCell(value: 'B3'),
          'column_c': PlutoCell(value: 'C3'),
        }),
      ],
    );
  }
}

Execution Environment

Flutter version Flutter version is 3.22.2

PlutoGrid version PlutoGrid version is 8.0.0

OS Windows 10/11

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 5 days ago

This issue was closed because it has been inactive for 14 days since being marked as stale.