mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 20:51:26 +00:00
Minor: add wrapper for table in block editor to make it scrollable (#15574)
* Minor: add wrapper for table in block editor to make it scrollable * Refactor TableMenu component to use class name 'tableWrapper' instead of attribute 'data-om-table'
This commit is contained in:
parent
234164584a
commit
2d1cc58664
@ -124,6 +124,7 @@ export const extensions = [
|
||||
class: 'om-table',
|
||||
'data-om-table': 'om-table',
|
||||
},
|
||||
resizable: true,
|
||||
}),
|
||||
TableRow.configure({
|
||||
HTMLAttributes: {
|
||||
|
@ -32,7 +32,7 @@ const TableMenu = (props: TableMenuProps) => {
|
||||
|
||||
const handleMouseDown = useCallback((event: MouseEvent) => {
|
||||
const target = event.target as HTMLElement;
|
||||
const table = target?.closest('[data-om-table]');
|
||||
const table = target?.closest('.tableWrapper');
|
||||
|
||||
if (table?.contains(target)) {
|
||||
tableMenuPopup.current?.setProps({
|
||||
|
@ -27,6 +27,10 @@
|
||||
// this is to have enough space after last node, referred from the reference editor
|
||||
padding-bottom: 30vh;
|
||||
}
|
||||
.om-block-editor > .tableWrapper {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
// show placeholder when editor is in focused mode
|
||||
.tiptap.ProseMirror-focused .is-node-empty.has-focus::before {
|
||||
color: @grey-3;
|
||||
|
Loading…
x
Reference in New Issue
Block a user