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
636 stars 290 forks source link

[Bug] Pluto Column won't freeze first column programatically #1009

Closed mrgithub closed 3 months ago

mrgithub commented 5 months ago

When I freeze the first column it is not visually frozen but the menu bar says it is when clicked. State manager says it's not frozen. No frozen columns are bigger than 200. I don't understand why it doesn't work.

First column looks like this:

 List<PlutoColumn> get columns {
    return <PlutoColumn>[
      PlutoColumn(
        title: 'Date',
        field: 'date',
        type: PlutoColumnType.date(format: "dd MMM"),
        readOnly: true,
        backgroundColor: Colors.black,
        enableColumnDrag: false,
        enableRowDrag: false,
        enableSorting: false,
        frozen: PlutoColumnFrozen.start,   // this should freeze it and should be enough
        titleSpan: getTitleSpan('Date'),
      ),

onLoaded looks like this:

onLoaded: (PlutoGridOnLoadedEvent event) {
                event.stateManager.setShowColumnFilter(false);
                event.stateManager.setColumnSizeConfig(
                    PlutoGridColumnSizeConfig(
                        autoSizeMode: PlutoAutoSizeMode.scale));
                event.stateManager.columns[0].frozen = PlutoColumnFrozen.start;   // tried to freeze it again just in case
                print("***frozen " + event.stateManager.showFrozenColumn.toString());  // shows false
              },
github-actions[bot] commented 4 months ago

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

github-actions[bot] commented 3 months ago

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