Skip to content

Commit

Permalink
feat(cdp): auto load slack channels (#26667)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarconLP authored Dec 5, 2024
1 parent 115f3af commit 9b79998
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/src/lib/integrations/SlackIntegrationHelpers.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LemonBanner, LemonButton, LemonInputSelect, LemonInputSelectOption, Link } from '@posthog/lemon-ui'
import { useActions, useValues } from 'kea'
import { IconSlackExternal } from 'lib/lemon-ui/icons'
import { useMemo } from 'react'
import { useEffect, useMemo } from 'react'

import { IntegrationType, SlackChannelType } from '~/types'

Expand Down Expand Up @@ -53,6 +53,12 @@ export function SlackChannelPicker({ onChange, value, integration, disabled }: S
return value
}, [value, slackChannels])

useEffect(() => {
if (!disabled) {
loadSlackChannels()
}
}, [loadSlackChannels, disabled])

return (
<>
<LemonInputSelect
Expand Down

0 comments on commit 9b79998

Please sign in to comment.