Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Clutch
Commits
72be0899
Unverified
Commit
72be0899
authored
3 years ago
by
Derek
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
frontend: metadata table should not update values if errors are present (#1757)
parent
aefeb958
wrapperForTimeSeries2
FixCordonNotes
GA4
RHF
add-capacity-info
add-list-pr-gh-api
add-origin
add-tabledetails-notes
addCaseInsensitiveAutocomplete
addSgTimeout
addTimeoutForSG
allIcons
auditAPI
auditBE
auditFE
autoSubmit
autoSubmitResolvers
autocomplete-clear-value
aws-multi-account
aws-multi-account-final-cutover
aws-multi-account-gen-clients
aws-multi-account-protos
blogNits
callbackToSetIndex
caseInsens1
catalog-config-extension
catalog-ql-patch
cfgExtends
changeGridLines
chaos_server-fault-enable-greater-precision
chartTests
clickAutocomplete
codecov
colorsFile
compose-duplicate-test
custom-title-logo
customHookForTimelinePleaseWork
darkModeTest1
dashLoadedCheck
datetimevalid
ddb-scale-factor-fix
deletePodLocationNotes
direct-client
docshousekeeping
dotenv
downloadConfigEnvoy
dschaller-patch-1
dschaller-patch-2
dschaller-patch-3
dynamodb-status-chips
emojiSupport
enable-partial-failures-for-pods
envoyTriageViaK8sDash
errorBoundaryLocation
eslintdocs
expSimplification
exportEmotionThings
expose-k8s-clientsets
feedbackMaxLength
first-of-type-fix
firstgogogo
fix-autocomplete-project-catalog
fix-github-app-auth-refresh
fixAlignOfIcons
fixDASHSpacing
fixDashSpacingPart1
fixwarning
frontend-autocomplete-patch
frontend-catalog-navigate-patch
frontend-highlight-parent
frontend-project-selector-patch
frontend-warning-extension
gcp-0.10.3
get-logs
ghrl
glangci-test
go-1-18
go-1.19-in-ci
go-actions-1-18
golangci
goworkspace
graphql
group-item-prefix
header-adjustments
hooksForAutoRefresh
horizontalExpansion
housekeepingclutch
iam-custompolicy-sim
inputTransformers
jest-coverage-fix
jg/github
jslaughter-patch-1
k8sDashAutosubmit
license-update
load-state-error
lowercaseAutocomplete
main
matv5
matv5-base
matv5-core
matv5-core-input
matv5-core-layout
matv5-joined
matv5-wizard
matv5-workflows
metrics-blog
metricsAPI
metricsProtos
mikecutalo-patch-1
minimistClutch
moarTests
moartests
mockProjects
mui-5-upgrade
mui-v5
mui-v5-codemods
mui-v5-core
mui5
muiv5-upgrade
murki-patch-1
nodeNameInCordonNode
nps-anytime
nps-collector
nps-custom-patch
openSourceReactMarkdownPane
otherEventTimes
override-search
paperMinWidth
pcDefaultProjects
pcResetState
pcSearch
pcSubtext
preflight-check-script
project-api-mocks
project-api-optional-compute-deps
project-catalog
project-catalog-config-patch
project-catalog-config-skeleton
project-catalog-details
project-catalog-scaffold
project-selector-autocomplete
project-selector-testing
proto-get-endpoint
protoForDeploys
qLinks1
qLinksF
qLinksForProjSelector
quickLinks1
quicklinks1
refreshDropdown
relativeCfgDir
reloadIntervalForProjSelector
remove-utm-params
removeBottomFeedbackButton
removeIcon
renderTestTimeseriesChart
renovate-patch
renovate/actions-setup-node-3.x
renovate/actions-stale-6.x
renovate/actions-upload-artifact-3.x
renovate/babel-monorepo
renovate/cypress-10.x
renovate/cypress-9.x
renovate/docker-build-push-action-3.x
renovate/docker-login-action-2.x
renovate/docker-setup-buildx-action-2.x
renovate/esbuild-0.x
renovate/eslint-config-airbnb-19.x
renovate/eslint-plugin-jest-25.x
renovate/eslint-plugin-jest-26.x
renovate/eslint-plugin-prettier-4.x
renovate/font-awesome
renovate/github.com-aws-aws-sdk-go-v2-1.x
renovate/github.com-aws-aws-sdk-go-v2-config-1.x
renovate/github.com-aws-aws-sdk-go-v2-credentials-1.x
renovate/github.com-aws-aws-sdk-go-v2-service-autoscaling-1.x
renovate/github.com-aws-aws-sdk-go-v2-service-kinesis-1.x
renovate/github.com-aws-aws-sdk-go-v2-service-s3-1.x
renovate/github.com-aws-smithy-go-1.x
renovate/github.com-bufbuild-buf-0.x
renovate/github.com-bufbuild-buf-1.x
renovate/github.com-coreos-go-oidc-v3-3.x
renovate/github.com-envoyproxy-go-control-plane-0.x
renovate/github.com-envoyproxy-protoc-gen-validate-0.x
renovate/github.com-fullstorydev-grpcurl-1.x
renovate/github.com-gogo-status-1.x
renovate/github.com-golang-migrate-migrate-v4-4.x
renovate/github.com-grpc-ecosystem-grpc-gateway-v2-2.x
renovate/github.com-jhump-protoreflect-1.x
renovate/github.com-lib-pq-1.x
renovate/github.com-masterminds-squirrel-1.x
renovate/github.com-shurcool-githubv4-digest
renovate/github.com-shurcool-graphql-digest
renovate/github.com-slack-go-slack-0.x
renovate/github.com-stretchr-testify-1.x
renovate/github.com-uber-go-tally-v4-4.x
renovate/github.com-yoheimuta-go-protoparser-v4-4.x
renovate/go-1.x
renovate/go.temporal.io-sdk-1.x
renovate/go.temporal.io-sdk-contrib-tally-0.x
renovate/go.uber.org-zap-1.x
renovate/golang-1.x
renovate/golang.org-x-net-digest
renovate/google.golang.org-genproto-digest
renovate/google.golang.org-grpc-1.x
renovate/google.golang.org-grpc-cmd-protoc-gen-go-grpc-1.x
renovate/google.golang.org-protobuf-1.x
renovate/hookform-devtools-3.x
renovate/hookform-devtools-4.x
renovate/hookform-resolvers-2.x
renovate/k8s.io-api-0.x
renovate/k8s.io-apimachinery-0.x
renovate/k8s.io-client-go-0.x
renovate/k8s.io-utils-digest
renovate/kubernetes-go
renovate/lock-file-maintenance
renovate/major-1-kubernetes-go
renovate/major-10-definitelytyped
renovate/major-10-kubernetes-go
renovate/major-11-kubernetes-go
renovate/major-16-definitelytyped
renovate/major-18-definitelytyped
renovate/major-18-react-monorepo
renovate/major-19-eslint
renovate/major-2-kubernetes-go
renovate/major-27-definitelytyped
renovate/major-27-unittest
renovate/major-28-definitelytyped
renovate/major-28-unittest
renovate/major-29-definitelytyped
renovate/major-3-kubernetes-go
renovate/major-4-eslint
renovate/major-5-typescript-eslint-monorepo
renovate/major-6-font-awesome
renovate/major-8-eslint
renovate/material-table-1.x
renovate/material-table-2.x
renovate/nivo-monorepo
renovate/node-16.x
renovate/node-17.x
renovate/node-18.x
renovate/node-19.x
renovate/npm-axios-vulnerability
renovate/npm-prismjs-vulnerability
renovate/npm-protobufjs-vulnerability
renovate/postgres-14.x
renovate/postgres-15.x
renovate/react-hook-thunk-reducer-0.x
renovate/react-scripts-5.x
renovate/webpack-4.x
renovate/webpack-dev-server-3.x
renovateFix
replaceNivoWithRechartsForEnvoy
responsiveTable
return-partial-errors
revert-2270-addCaseInsensitiveAutocomplete
revert-2348-timeago-patch
s3accessdebugger-oss
safetyCheckForAccounts
scaffold-non-wizard
scaffold-update
scaffoldingYarn
scatterPlotTimeline
select-grouping
select-patch
shortlink-protos
shortlink-scaffolding
shortlink-wip
singleChoiceDrawer
sl-bug-fix
sl-patch
slowloris
smonero-patch-1
spacingAdjustment
sperry-CreateFeedback-proto
sperry-GetFeedbackQuestions-proto
sperry-SubmitFeedback-API
sperry-add-GetSurveys-module
sperry-add-emojis
sperry-add-prop
sperry-autocomplete-fix-experimentations
sperry-enableFeedback-prop
sperry-extend-type
sperry-feedback-config
sperry-feedback-docs
sperry-globally-enable-wizard
sperry-project-links-proto
sperry-project-selector-autocomplete
sperry-proxy-module-host-header
sperry-query-params
sperry-remove-npswizard-featureflag
sperry-resize-hpa-notes
sperry-see-more-card-action
sperry-stats-prefix
sperry-update-package
state-hydration
state-hydration-alerts
state-hydration-selector
state-hydration-short-links
state-hydration-storage
supportStylingOfCharts
temporal-client
tfAdornment
themeProvider
timeSelectorHooks
timeago-component
todosPublic
toggleButtonGroup
toggleTest
transientProps
trimPrefixForAWS
typographyNoWrap
typographyfix
update-air-tool
update-card-styling
update-kind-tool
updatePodEventProto
validate-pattern-at-runtime
wrapper2
wrapperForTimeSeries
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/packages/core/src/Table/metadata-table.tsx
+7
-2
frontend/packages/core/src/Table/metadata-table.tsx
with
7 additions
and
2 deletions
+7
-2
frontend/packages/core/src/Table/metadata-table.tsx
+
7
-
2
View file @
72be0899
...
...
@@ -140,6 +140,11 @@ interface MutableRowProps extends ImmutableRowProps {
const
MutableRow
:
React
.
FC
<
MutableRowProps
>
=
({
data
,
onUpdate
,
onReturn
,
validation
})
=>
{
const
error
=
validation
.
errors
?.[
data
.
name
];
// intercept the update callback to prevent updates if there are form errors present
// based on the validation.
const
updateCallback
=
(
e
:
React
.
ChangeEvent
<
HTMLTextAreaElement
|
HTMLInputElement
>
)
=>
error
?
()
=>
{}
:
onUpdate
(
e
);
return
(
<
TableRow
key
=
{
data
.
id
}
>
<
KeyCell
data
=
{
data
}
/>
...
...
@@ -154,9 +159,9 @@ const MutableRow: React.FC<MutableRowProps> = ({ data, onUpdate, onReturn, valid
name
=
{
data
.
name
}
defaultValue
=
{
data
.
value
}
type
=
{
data
?.
input
?.
type
}
onChange
=
{
onU
pdate
}
onChange
=
{
u
pdate
Callback
}
onReturn
=
{
onReturn
}
onFocus
=
{
onU
pdate
}
onFocus
=
{
u
pdate
Callback
}
inputRef
=
{
validation
.
register
}
helperText
=
{
error
?.
message
||
""
}
error
=
{
!!
error
||
false
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help