Skip to content
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

[#1428] improvement(UI): Filtering empty keys when create or update #1412

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 6 additions & 4 deletions web/app/(home)/CreateMetalakeDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ const CreateMetalakeDialog = props => {
}

const onSubmit = data => {
const properties = innerProps.reduce((acc, item) => {
acc[item.key] = item.value
const properties = innerProps
.filter(i => i.key.trim() !== '')
.reduce((acc, item) => {
acc[item.key] = item.value

return acc
}, {})
return acc
}, {})

const metalakeData = {
...data,
Expand Down
10 changes: 6 additions & 4 deletions web/app/metalakes/CreateCatalogDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,13 @@ const CreateCatalogDialog = props => {
.then(() => {
let properties = {}

const prevProperties = innerProps.reduce((acc, item) => {
acc[item.key] = item.value
const prevProperties = innerProps
.filter(i => i.key.trim() !== '')
.reduce((acc, item) => {
acc[item.key] = item.value

return acc
}, {})
return acc
}, {})

const {
'catalog-backend': catalogBackend,
Expand Down
Loading