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

[Help] setSelectionMode is not working? #990

Closed juppdes closed 5 months ago

juppdes commented 7 months ago

I am using in dark mode. PlutoGridMode.selectWithOneTap, stateManager.setSelectingMode(PlutoGridSelectingMode.none); It is still selecting the clicked cell. Am I doing something wrong? below my code.

PlutoGrid(
    mode: PlutoGridMode.selectWithOneTap, 
    configuration: Theme.of(context).brightness == Brightness.dark 
    ? const PlutoGridConfiguration.dark(
        style: PlutoGridStyleConfig.dark(
          oddRowColor: Color(0x5C50504F)
        ),
        localeText: PlutoGridLocaleText.brazilianPortuguese(),
        scrollbar: PlutoGridScrollbarConfig(
          isAlwaysShown: false,
          scrollbarThickness: 10,
          scrollbarThicknessWhileDragging: 10,
          draggableScrollbar: true,
        ),
    ) 
    : const PlutoGridConfiguration(
        style: PlutoGridStyleConfig(
          oddRowColor: Color(0xFFFFECB3),
        ),
        localeText: PlutoGridLocaleText.brazilianPortuguese(),
        scrollbar: PlutoGridScrollbarConfig(
          isAlwaysShown: false,
          scrollbarThickness: 10,
          scrollbarThicknessWhileDragging: 10,
          scrollBarColor: Colors.blue,
          draggableScrollbar: true,
        ),
    ),
    columns: colunasGeradas,
    rows: linhasGeradas,
    onSelected: (dados) => print(dados),
    onLoaded: (PlutoGridOnLoadedEvent event) {
      stateManager = event.stateManager;
      stateManager.setShowColumnFilter(true);
      stateManager.setSelectingMode(PlutoGridSelectingMode.none);
    },
    onChanged: (PlutoGridOnChangedEvent event) {
      print(event);
    },
),
github-actions[bot] commented 6 months ago

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

github-actions[bot] commented 5 months ago

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