[VUE] How to add custom save button inside Grid cell to save changes instead of clicking on another cell?

Our blazing fast Grid component built with pure JavaScript


Post Reply
User avatar
m4qo5
Posts: 8
Joined: Tue Mar 31, 2020 8:58 am

[VUE] How to add custom save button inside Grid cell to save changes instead of clicking on another cell?

Post by m4qo5 »

Hi! Please, could you refer me to the documentation about adding custom save button on grid cell edit? I've researched a documentation but didn't find anything. Thanks!

User avatar
saki
Core Developer
Core Developer
Posts: 594
Joined: Thu Mar 30, 2017 9:32 am

Re: [VUE] How to add custom save button inside Grid cell to save changes instead of clicking on another cell?

Post by saki »

Adding the button directly in the cell would not be recommended. If you want to send modified data to the server immediately after editing, it is enough to set autoCommit:true on the Grid store.

It is also possible to have autoCommit:false and an out-of-the-grid button clicking of which would call the store's commit method.

See https://bryntum.com/docs/grid/#guides/data/ajaxstore.md for more details on working with data please.

User avatar
m4qo5
Posts: 8
Joined: Tue Mar 31, 2020 8:58 am

Re: [VUE] How to add custom save button inside Grid cell to save changes instead of clicking on another cell?

Post by m4qo5 »

Could you explain please why adding button in the cell would not be recommended? Is it possible to have autocommit: true, and save while user types delayed with debounce? Thank you

User avatar
saki
Core Developer
Core Developer
Posts: 594
Joined: Thu Mar 30, 2017 9:32 am

Re: [VUE] How to add custom save button inside Grid cell to save changes instead of clicking on another cell?

Post by saki »

The coding of placing the button in the cell can be just more work. You need to create it, align it into the cell editor and then destroy it. So not recommended to avoid this work, there are no real technical barriers.

Yes, you can set autoCommit:true and the changes will be saved automatically after users goes to another cell. If you want to save as user presses keys you would need to listen to keypress event and decide when to save.

Post Reply