mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-27 20:14:57 +02:00
Fix general attributes replacements (#3438)
Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
This commit is contained in:
@@ -161,8 +161,6 @@
|
||||
$: if (keepOriginalAttribytes) {
|
||||
setOriginalAttributes()
|
||||
} else if (currentSpace !== undefined) {
|
||||
statusToUpdate = {}
|
||||
componentToUpdate = {}
|
||||
setReplacementAttributres(currentSpace)
|
||||
}
|
||||
|
||||
@@ -361,7 +359,18 @@
|
||||
props: { label: tracker.string.KeepOriginalAttributesTooltip }
|
||||
}}
|
||||
>
|
||||
<div class="mr-2"><Toggle disabled={!isManageAttributesAvailable} bind:on={keepOriginalAttribytes} /></div>
|
||||
<div class="mr-2">
|
||||
<Toggle
|
||||
disabled={!isManageAttributesAvailable}
|
||||
on:change={() => {
|
||||
keepOriginalAttribytes = !keepOriginalAttribytes
|
||||
if (!keepOriginalAttribytes) {
|
||||
statusToUpdate = {}
|
||||
componentToUpdate = {}
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<Label label={tracker.string.KeepOriginalAttributes} />
|
||||
</div>
|
||||
<div class="buttons">
|
||||
|
||||
@@ -156,7 +156,10 @@
|
||||
if (value !== undefined) {
|
||||
const createComponent = typeof value === 'object'
|
||||
const c = createComponent ? value.create : value
|
||||
statusToUpdate = { ...statusToUpdate, [component._id]: { ref: c, create: createComponent } }
|
||||
componentToUpdate = {
|
||||
...componentToUpdate,
|
||||
[component._id]: { ref: c, create: createComponent }
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user