Skip to content

Fix disabling of generate button #7617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkg/webui/console/containers/dev-eui-component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import classnames from 'classnames'
import { defineMessages } from 'react-intl'

import Input from '@ttn-lw/components/input'
import Form from '@ttn-lw/components/form'
import Form, { useFormContext } from '@ttn-lw/components/form'

import Message from '@ttn-lw/lib/components/message'

Expand All @@ -44,6 +44,7 @@ const DevEUIComponent = props => {
const { name, required, disabled, autoFocus } = props

const dispatch = useDispatch()
const { values } = useFormContext()
const appId = useSelector(selectSelectedApplicationId)
const promisifiedIssueDevEUI = attachPromise(issueDevEUI)
const fetchDevEUICounter = attachPromise(getApplicationDevEUICount)
Expand Down Expand Up @@ -87,7 +88,8 @@ const DevEUIComponent = props => {
const devEUIGenerateDisabled =
applicationDevEUICounter === env.devEUIConfig.applicationLimit ||
!env.devEUIConfig.devEUIIssuingEnabled ||
devEUIGenerated
devEUIGenerated ||
values.ids.dev_eui !== ''

return env.devEUIConfig.devEUIIssuingEnabled ? (
<Form.Field
Expand Down
Loading