Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] PlutoColumn renderer widget "unable to input" #1105

Open
nsnans opened this issue Sep 9, 2024 · 4 comments
Open

[Bug] PlutoColumn renderer widget "unable to input" #1105

nsnans opened this issue Sep 9, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@nsnans
Copy link

nsnans commented Sep 9, 2024

Steps to reproduce the bug

  • Create a new project
  • Change main.dart
import 'package:flutter/material.dart';
import 'package:pluto_grid/pluto_grid.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'PlutoGrid Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const PlutoGridExamplePage(),
      // home: Scaffold(
      //   body: TextField(
      //     onChanged: (value) {
      //       print(value);
      //     },
      //   ),
      // ),
    );
  }
}

class PlutoGridExamplePage extends StatefulWidget {
  const PlutoGridExamplePage({Key? key}) : super(key: key);

  @override
  State<PlutoGridExamplePage> createState() => _PlutoGridExamplePageState();
}

class _PlutoGridExamplePageState extends State<PlutoGridExamplePage> {
  final List<PlutoColumn> columns = <PlutoColumn>[
    PlutoColumn(
      title: 'Id',
      field: 'id',
      type: PlutoColumnType.number(),
      renderer: (rendererContext) {
        return TextField(
          onChanged: (value) {
            print(value);
          },
        );
      },
    ),
  ];

  final List<PlutoRow> rows = [
    PlutoRow(
      cells: {
        'id': PlutoCell(value: 'user1'),
      },
    ),
    PlutoRow(
      cells: {
        'id': PlutoCell(value: 'user2'),
      },
    ),
    PlutoRow(
      cells: {
        'id': PlutoCell(value: 'user3'),
      },
    ),
  ];

  late final PlutoGridStateManager stateManager;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        padding: const EdgeInsets.all(15),
        child: PlutoGrid(
          columns: columns,
          rows: rows,
          onLoaded: (PlutoGridOnLoadedEvent event) {
            stateManager = event.stateManager;
          },
          onChanged: (PlutoGridOnChangedEvent event) {
            print(event);
          },
          configuration: const PlutoGridConfiguration(),
        ),
      ),
    );
  }
}

Expected results

The TextField returned by the renderer can be modified

Actual results

The TextField returned by the renderer cannot be modified, but it can be focused

Code sample

See the steps to reproduce the bug

Execution Environment

Flutter version

[√] Flutter (Channel stable, 3.24.2, on Microsoft Windows [版本 10.0.22631.4037], locale zh-CN)
    • Flutter version 3.24.2 on channel stable at D:\flutter\FVM_HOME\versions\3.24.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4cf269e36d (5 days ago), 2024-09-03 14:30:00 -0700
    • Engine revision a6bd3f1de1
    • Dart version 3.5.2
    • DevTools version 2.37.2

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at D:\AndroidSdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: D:\JetBrains\JetbrainsToolbox\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Enterprise 2022 17.10.6)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Enterprise
    • Visual Studio Enterprise 2022 version 17.10.35201.131
    • Windows 10 SDK version 10.0.26100.0

[√] Android Studio (version 2024.1)
    • Android Studio at D:\JetBrains\JetbrainsToolbox\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)

[√] IntelliJ IDEA Ultimate Edition (version 2024.1)
    • IntelliJ at D:\JetBrains\JetbrainsToolbox\IntelliJ IDEA Ultimate
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] VS Code (version 1.93.0)
    • VS Code at C:\Users\Toppine-DEV12\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.96.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [版本 10.0.22631.4037]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 128.0.6613.120
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 128.0.2739.63

[√] Network resources
    • All expected network resources are available.

• No issues found!

PlutoGrid version

8.0.0

OS

Windows 11

@nsnans nsnans added the bug Something isn't working label Sep 9, 2024
Copy link

github-actions bot commented Oct 9, 2024

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

@github-actions github-actions bot added the stale This issue is stale because it has been open for 30 days with no activity. label Oct 9, 2024
@nsnans
Copy link
Author

nsnans commented Oct 10, 2024

Still no solution

@github-actions github-actions bot removed the stale This issue is stale because it has been open for 30 days with no activity. label Oct 10, 2024
@grillbiff
Copy link

I have the same issue. Is PlutoGrid intercepting the input to detect enters and tabs (grid navigation) etc? I can actually input values if I start with a ^

@nsnans
Copy link
Author

nsnans commented Nov 5, 2024

I have the same issue. Is PlutoGrid intercepting the input to detect enters and tabs (grid navigation) etc? I can actually input values if I start with a ^

If it is running on a mobile phone, you can enter. However, I tested it on web and Windows and couldn't type it. Not sure what the problem is.

Still no solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants