You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
Is there any way to update a single input text from a modal after a selection from another field (select)?
I have the following code:
case slack.InteractionTypeBlockActions:
// This is a block action, so we need to handle it
for _, action := range interaction.ActionCallback.BlockActions {
if action.ActionID == "incidentStatus" {
updatedStatusMessage := site24x7.GetDefaultStatusMessage(site24x7.IncidentStatus(selectedIncidentStatusIndex))
// TRYING TO DO STUFF HERE
currentBlocks := createSite24x7ModalRequest.Blocks
blocks, _ := interaction.View.Blocks.MarshalJSON()
for _, block := range currentBlocks {
if block.(slack.InputBlock).BlockID == "incidentStatus" {
// createSite24x7ModalRequest.Blocks.BlockSet = currentBlocks
// BELOW IS THE ONLY CHANGE I WANT TO DO ON THE WHOLE MODAL
// createSite24x7ModalRequest.Blocks.BlockSet[i].(slack.InputBlock).Element.(slack.PlainTextInputBlockElement).InitialValue = updatedStatusMessage
// currentBlocks[i].(slack.InputBlock).(PlainTextInputBlockElement)
}
}
}
// Need to pass the updated Request
client.UpdateView(createSite24x7ModalRequest, createSite24x7ModalExternalID, createSite24x7ModalHash, createSite24x7ModalID)
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
Is there any way to update a single input text from a modal after a selection from another field (select)?
I have the following code:
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions