Skip to content

Add property to disable auto save #218

Open
@mitchell-bu

Description

@mitchell-bu

Is your feature request related to a problem? Please describe.
When editing larger transcripts, we are noticing that the component becomes unresponsive while it is handling the auto save. We don't care about capturing all of the changes as they happen and instead prefer to wait until the user switches back out of editing mode to capture the new content.

Describe the solution you'd like
I would like to add a new property, IsAutoUpdateOn, to the editor components. When set to true, the autosave will be skipped in the onChange method.

Describe alternatives you've considered
We've considered setting the handleAutoSaveChanges function to null, but the component throws an unhandled exception when this happens. This can actually be observed in the demo site.
image
Also, if this function is null, there is currently no way to get the modified content once editing is complete. So we will still need this function to fire when the isEditable changes to false. This means that handleAutoSaveChanges becomes a bit of a misnomer. I suppose one option here is instead of adding a new bool property, we can add a new function property for handleEditingComplete. And then the logic becomes to check if the function is defined before going into the execution blocks.

Additional context
I have forked this repo and will be making these changes as they are necessary for the acceptable performance in our situation. If you think these changes hold merit and would be useful for others, I will create a PR to pull them in here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancementa request for improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions