-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TNO-2501 Fix My Folders #1753
TNO-2501 Fix My Folders #1753
Conversation
Publish tno-core:0.1.55
/// <returns></returns> | ||
[HttpPut("{id}")] | ||
[Produces(MediaTypeNames.Application.Json)] | ||
[ProducesResponseType(typeof(FolderModel), (int)HttpStatusCode.OK)] | ||
[ProducesResponseType(typeof(ErrorResponseModel), (int)HttpStatusCode.BadRequest)] | ||
[SwaggerOperation(Tags = new[] { "Folder" })] | ||
public IActionResult Update(FolderModel model) | ||
public IActionResult Update(FolderModel model, bool updateContent = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this flag to allow us to update a folder without touching the content in it.
@@ -51,6 +51,10 @@ export const ConfigureFolder: React.FC<IConfigureFolderProps> = ({ active }) => | |||
if (myFolders.length) setInit(true); | |||
}, [myFolders.length]); | |||
|
|||
React.useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdtoombs This is how a passed prop can update state.
@@ -122,7 +126,7 @@ export const ConfigureFolder: React.FC<IConfigureFolderProps> = ({ active }) => | |||
const handleSaveFolder = React.useCallback( | |||
async (values: IFolderModel) => { | |||
try { | |||
const result = await updateFolder(values); | |||
const result = await updateFolder(values, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't touch the content!
Fixed bug where content was being removed from folder when the folder schedule was updated.
Summary
My Folders