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

feature/#172-editTable-grid-header-should-be-sticky #179

Merged
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
3 changes: 1 addition & 2 deletions src/pods/canvas/canvas.pod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const CanvasPod: React.FC = () => {
const { openModal, closeModal, modalDialog } = useModalDialogContext();
const {
canvasSchema,
loadSchema,
updateTablePosition,
updateFullTable,
doFieldToggleCollapse,
Expand All @@ -36,7 +35,7 @@ export const CanvasPod: React.FC = () => {
const { canvasSize, zoomFactor } = canvasViewSettings;
// TODO: This is temporary code, once we get load and save
// we won't need to load this mock data
// From now onwards use the examples under db-exampls folder
// From now onwards use the examples under db-examples folder
// Open ...
/*
React.useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/pods/edit-table/components/nested-field-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const NestedFieldGrid: React.FC<NestedFieldGridProps> = ({
onMoveUpField,
}) => {
const renderFieldHeaders = () => (
<div className={`${classes.fieldRow} ${classes[`indent${level}`]}`}>
<div className={`${classes.headerRow} ${classes[`indent${level}`]}`}>
<div className={`${classes.headerCell} ${classes.expandCell}`}>
Expand
</div>
Expand Down
12 changes: 10 additions & 2 deletions src/pods/edit-table/edit-table.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
margin: 10px;
}

.fieldRow {
.fieldRow,
.header-row {
display: grid;
grid-template-columns: auto auto auto 3fr 2fr 80px 340px;
gap: 0px;
Expand Down Expand Up @@ -68,9 +69,16 @@
margin-left: 140px;
}

/*The top position of the two position sticky's are
related to each other and to the dialog header*/
.indent0.header-row {
position: sticky;
top: 5.3125rem;
z-index: 3;
}
.table-name {
position: sticky;
top: 40px;
top: 2.5rem;
left: 0px;
padding-top: 10px;
padding-bottom: 10px;
Expand Down
Loading