Fi issues with field controls not being updated
This commit is contained in:
parent
3df166c2fb
commit
155b067236
|
@ -17,20 +17,30 @@
|
||||||
export let originalProfile:String
|
export let originalProfile:String
|
||||||
export let rkey:number = 0
|
export let rkey:number = 0
|
||||||
|
|
||||||
|
|
||||||
|
let fieldControls:ControlAction[]
|
||||||
|
|
||||||
const chatId = chat.id
|
const chatId = chat.id
|
||||||
let show = false
|
let show = false
|
||||||
|
|
||||||
|
const buildFieldControls = () => {
|
||||||
|
fieldControls = (setting.fieldControls || [] as FieldControl[]).map(fc => {
|
||||||
|
return fc.getAction(chatId, setting, chatSettings[setting.key])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFieldControls()
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
show = (typeof setting.hide !== 'function') || !setting.hide(chatId)
|
show = (typeof setting.hide !== 'function') || !setting.hide(chatId)
|
||||||
|
buildFieldControls()
|
||||||
})
|
})
|
||||||
|
|
||||||
afterUpdate(() => {
|
afterUpdate(() => {
|
||||||
show = (typeof setting.hide !== 'function') || !setting.hide(chatId)
|
show = (typeof setting.hide !== 'function') || !setting.hide(chatId)
|
||||||
|
buildFieldControls()
|
||||||
})
|
})
|
||||||
|
|
||||||
const fieldControls:ControlAction[] = (setting.fieldControls || [] as FieldControl[]).map(fc => {
|
|
||||||
return fc.getAction(chatId, setting, chatSettings[setting.key])
|
|
||||||
})
|
|
||||||
|
|
||||||
if (originalProfile) {
|
if (originalProfile) {
|
||||||
// eventually...
|
// eventually...
|
||||||
|
|
Loading…
Reference in New Issue