From aff6e4359d76a1091c38b7f0de26e98b18668c48 Mon Sep 17 00:00:00 2001 From: Maksim Efremov Date: Sat, 23 Dec 2023 00:43:05 +0300 Subject: [PATCH] chore(CHYT): better vaildation for start dialog [YTFRONT-3683] --- .../ChytConfirmation/ChytConfirmation.tsx | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/packages/ui/src/ui/pages/chyt/ChytConfirmation/ChytConfirmation.tsx b/packages/ui/src/ui/pages/chyt/ChytConfirmation/ChytConfirmation.tsx index aad34c149..fa0d53664 100644 --- a/packages/ui/src/ui/pages/chyt/ChytConfirmation/ChytConfirmation.tsx +++ b/packages/ui/src/ui/pages/chyt/ChytConfirmation/ChytConfirmation.tsx @@ -139,7 +139,7 @@ function ChytStartConfirmation({ }} footerProps={{textApply: `Start clique ${alias}`}} onClose={onClose} - initialValues={{pool: pool ?? format.NO_VALUE}} + initialValues={{pool: pool}} onAdd={(form) => { const {untracked} = form.getState().values; return dispatch(chytListAction('start', {alias, untracked})) @@ -163,25 +163,8 @@ function ChytStartConfirmation({ type: 'plain', name: 'pool', caption: 'Pool', - }, - { - type: 'block', - name: 'poolNotice', - visibilityCondition: { - when: 'pool', - isActive: (v) => !v, - }, - extras: ({pool, untracked}: StartFormValues) => { - return { - children: - !pool && !untracked ? ( - - Pool is not set. Clique without a pool can be started only - in untracked mode. Set the pool in speclet options to start - the clique in normal mode. - - ) : null, - }; + extras: { + placeholder: format.NO_VALUE, }, }, {