mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
Sp 1702 fe when we click on edit button for a space and click ok without editing the save button is appearing (#243)
<!-- Thanks for contributing! Provide a description of your changes below and a general summary in the title Please look at the following checklist to ensure that your PR can be accepted quickly: --> ## Jira Ticket [sp:1702 fix Bug](https://syncrow.atlassian.net/browse/SP-1702) ## Description fix the issue when nothing edited save button not appears ## Type of Change <!--- Put an `x` in all the boxes that apply: --> - [ ] ✨ New feature (non-breaking change which adds functionality) - [x] 🛠️ Bug fix (non-breaking change which fixes an issue) - [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change) - [ ] 🧹 Code refactor - [ ] ✅ Build configuration change - [ ] 📝 Documentation - [ ] 🗑️ Chore
This commit is contained in:
@ -171,4 +171,13 @@ extension SpaceExtensions on SpaceModel {
|
||||
|
||||
return tagValues;
|
||||
}
|
||||
|
||||
bool isNoChangesSubmited(String name, icon, SpaceTemplateModel? spaceModel,
|
||||
List<SubspaceModel>? subspaces, List<Tag>? tags) {
|
||||
return (name == this.name &&
|
||||
icon == this.icon &&
|
||||
spaceModel == this.spaceModel &&
|
||||
subspaces == this.subspaces &&
|
||||
tags == this.tags);
|
||||
}
|
||||
}
|
||||
|
@ -384,6 +384,15 @@ class _CommunityStructureAreaState extends State<CommunityStructureArea> {
|
||||
SpaceTemplateModel? spaceModel,
|
||||
List<SubspaceModel>? subspaces,
|
||||
List<Tag>? tags) {
|
||||
if (widget.selectedSpace!.isNoChangesSubmited(
|
||||
name,
|
||||
icon,
|
||||
spaceModel,
|
||||
subspaces,
|
||||
tags,
|
||||
)) {
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
// Update the space's properties
|
||||
widget.selectedSpace!.name = name;
|
||||
|
Reference in New Issue
Block a user