Comments (3)
Hi @akgitrus
Thanks for pointing out the bug regarding column onChange. I have just checked-in the code to add support to other EditableControlType types like Dropdown, Date & TagPicker. For the implementation, please check the commented code in 'attachGridValueChangeCallbacks' function in gridconsumer.tsx file. Do let me know if this solves your issue.
Regarding your second question for onChange, column level onChange is just meant to be a callback when the user is making any live changes, where it sends you back the live changes in grid data, even if the user hasnt saved those. This implementation was provided to give control to the user to implement their custom functionality on the grid data if need be.
An example of that would be 'Showing Summation of any number column'. In this case, user may want the summation to be live as he/she edits the values in the number column.
As for your requirement, where you need to push values to backend, column level onChange will not be the right choice.
What you need is 'onGridSave' callback function. You can check the implementation for the same in onGridSave function in gridconsumer.tsx file.
onGridSave gets fired when the user clicks on the 'Submit' button in the grid. The function callback receives entire Grid data. If you need to identify the rows that you have updated, you can use 'grid_row_operation' property in the data like this:-
data.filter(item => item.grid_row_operation == Operation.Update)
Same way you can filter for both Added and Deleted rows as well.
I have updated the onGridSave function to show these implementations as well.
You can refer the same in this PR:-
#48
Please do let me know if this solves your problem.
from fluentuieditabledetailslist.
Hi Kushal, thank you for quick response and fix! I think it solves my current issue.
Regarding the column's onChange - it is more clear now after your explanation. But consider my idea, may be for future releases, - I didn't want to use the "Submit" button at all - to make the UI more concise and save changes on-the-fly as the user make their input.
Anyways, now I'm ok. Thanks again, appreciate your help.
from fluentuieditabledetailslist.
Hi Kushal, thank you for quick response and fix! I think it solves my current issue.
Regarding the column's onChange - it is more clear now after your explanation. But consider my idea, may be for future releases, - I didn't want to use the "Submit" button at all - to make the UI more concise and save changes on-the-fly as the user make their input.
Anyways, now I'm ok. Thanks again, appreciate your help.
Hi @akgitrus . Point taken. I can consider adding that functionality based on a configuration. May be not triggering onGridSave callbacks as and when the user is typing but when the user is done with on-the-fly changes and wants the grid to auto-reconcile(i.e. without having to explicitly click on the 'Submit' button). Thanks for the feedback.
Since your issue is resolved, I'll close this thread but do feel free to open more issue threads as and when you face any challenges and I can help resolve those. Thanks.
from fluentuieditabledetailslist.
Related Issues (20)
- "CSV" Export Fails in SPFx in SharePoint Online outside of Workbench due to SharePoint link manipulation HOT 2
- column minWidth HOT 1
- Footer : onRenderItemColumn
- IColumnConfig "onRender" (derived from IColumn) kills "edit" functionality HOT 8
- OnRerender the items are not visible
- Clicking on "Bulk Edit" causes TypeError: Cannot read properties of undefined (reading 'setExtraStackFrame') | react-jsx-runtime.development.js | happens ONLY when serving my SPFx project in development mode HOT 4
- Column filter - automatic remove select all
- Freeze Actions Column as the first Column
- Style not being applied to columns
- Project still active?
- Selection is not working
- Selection is bound to row position but not the actual selected row
- Sorting on dataType 'date' is broken HOT 1
- Grouping items HOT 1
- Unable to extend command bar HOT 2
- Format date
- Modal "Column Filter" strange initial rendered components.
- xlsx vulnerablility in fluent editable grid
- Not loading items from Dataverse table within Power Apps Studio
- When a row is not selected, can you provide an option to display the checkbox?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentuieditabledetailslist.