pluto_grid icon indicating copy to clipboard operation
pluto_grid copied to clipboard

is there a method when click column ?

Open Sindyue opened this issue 3 years ago • 6 comments

Here is a requirement. When I click each line, there is a callback method to listen. Currently, onloaded is used, but this method will be called many times. Is there a separate click event listening method?

Sindyue avatar Apr 07 '22 06:04 Sindyue

https://weblaze.dev/pluto_grid/build/web/#feature/dual-mode

The example in the link above works as follows.

Receive an event when the current row of the left A grid among the two grids changes. When an event is received, the callback function operates and updates the row on the right B grid.

conclusion. https://github.com/bosskmk/pluto_grid/blob/master/demo/lib/screen/feature/dual_mode_screen.dart#L155

As in the source of the link above, you can implement the desired function by registering a callback with the stateManager.addListener function.

bosskmk avatar Apr 07 '22 12:04 bosskmk

您好,感谢您百忙之中送来的问候,,漫享~~~

Sindyue avatar Apr 07 '22 12:04 Sindyue

https://weblaze.dev/pluto_grid/build/web/#feature/dual-mode

The example in the link above works as follows.

Receive an event when the current row of the left A grid among the two grids changes. When an event is received, the callback function operates and updates the row on the right B grid.

conclusion. https://github.com/bosskmk/pluto_grid/blob/master/demo/lib/screen/feature/dual_mode_screen.dart#L155

As in the source of the link above, you can implement the desired function by registering a callback with the stateManager.addListener function.

if (gridAStateManager.currentRow!.key != currentRowKey) { currentRowKey = gridAStateManager.currentRow!.key;

  gridBStateManager.setShowLoading(true);

  fetchUserActivity();
}

When I click the same column repeatedly, it cannot respond; Is there any way to listen, respond every click, and respond only once every click?

Sindyue avatar May 12 '22 01:05 Sindyue

@Sindyue PlutoGrid 's constructor has an onRowDoubleTap callback.

In the case of a single tap, if you set the mode of PlutoGrid to select, you can get the desired result with the onSelected callback. (However, the cell editing function does not work.)

It would be nice to add an onRowTap (one tap) callback to the PlutoGrid . However, in this case, the existing actions such as cell editing and row selection are overlapped, so it seems that UX consideration is necessary.

bosskmk avatar May 12 '22 01:05 bosskmk

OK, thank you very much for your guidance。

------------------ 原始邮件 ------------------ 发件人: "Manki @.>; 发送时间: 2022年5月12日(星期四) 上午9:59 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [bosskmk/pluto_grid] is there a method when click column ? (Issue #405)

@Sindyue PlutoGrid 's constructor has an onRowDoubleTap callback.

In the case of a single tap, if you set the mode of PlutoGrid to select, you can get the desired result with the onSelected callback. (However, the cell editing function does not work.)

It would be nice to add an onRowTap (one tap) callback to the PlutoGrid . However, in this case, the existing actions such as cell editing and row selection are overlapped, so it seems that UX consideration is necessary.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Sindyue avatar May 12 '22 02:05 Sindyue

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

github-actions[bot] avatar Jul 30 '22 11:07 github-actions[bot]

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

github-actions[bot] avatar Aug 15 '22 11:08 github-actions[bot]