onLoaded method

void onLoaded(
  1. PlutoGridOnLoadedEvent e
)

Implementation

void onLoaded(PlutoGridOnLoadedEvent e) {
  _stateManager = e.stateManager;

  _stateManager!.setSelectingMode(PlutoGridSelectingMode.row, notify: false);

  if (_stateManager!.rows.isNotEmpty) {
    _stateManager!.setKeepFocus(true, notify: false);

    _stateManager!.setCurrentCell(
      _stateManager!.rows.first.cells[FilterHelper.filterFieldValue],
      0,
      notify: false,
    );

    if (focusFirstFilterValue) {
      _stateManager!.setEditing(true, notify: false);
    }
  }

  _stateManager!.notifyListeners();

  _stateManager!.addListener(stateListener);
}