Skip to content

Commit

Permalink
fix(openapi-playground): er struct updates
Browse files Browse the repository at this point in the history
  • Loading branch information
morlay committed Jan 9, 2025
1 parent 11e98e9 commit ce4abc6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions webapp/openapi-playground/mod/openapi/DatabaseErView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ export type ErColumn = {
export type ErConstraint = {
title?: string
description?: string
columnNames: Array<string>
columnNames: Array<{
name: string,
options?: string[]
}>
method?: string
unique?: boolean
primary?: boolean
Expand Down Expand Up @@ -122,7 +125,7 @@ const DatabaseErTableView = component$<{
return (
<DatabaseErTableDef
onMouseover={() => {
focus$.next(constraint.columnNames);
focus$.next(constraint.columnNames.map((x) => x.name));
}}
onMouseleave={() => {
focus$.next([]);
Expand All @@ -137,7 +140,7 @@ const DatabaseErTableView = component$<{
{constraintName}
</span>
<span>
({constraint.columnNames.join(",")})
({constraint.columnNames.map((x) => [x.name, ...(x.options ?? [])].join(" ")).join(",")})
</span>
</DatabaseErTableConstraintName>
</DatabaseErTableDef>
Expand Down

0 comments on commit ce4abc6

Please sign in to comment.