remove unspecified large table reset control
This commit is contained in:
1 parent
09966cea10
commit
cf6149bf24
3 files changed
-33
No files matched your search
@@ -94,7 +94,6 @@
|
|||||||
<button class="sg-input-clear-button" type="button" aria-label="Eingabe löschen">×</button>
|
<button class="sg-input-clear-button" type="button" aria-label="Eingabe löschen">×</button>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<button class="sg-large-table__reset-widths" type="button" data-large-table-reset-widths>Standardbreiten</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sg-card-segment sg-card-segment--body sg-card-segment--white sg-large-table__row sg-large-table__row--header" role="row" data-component-part="large-table-header-row">
|
<div class="sg-card-segment sg-card-segment--body sg-card-segment--white sg-large-table__row sg-large-table__row--header" role="row" data-component-part="large-table-header-row">
|
||||||
|
|||||||
@@ -131,18 +131,6 @@
|
|||||||
updateHandleState(table, safeWidths, minWidth);
|
updateHandleState(table, safeWidths, minWidth);
|
||||||
};
|
};
|
||||||
|
|
||||||
const resetWidths = (table) => {
|
|
||||||
const headers = getColumnHeaders(table);
|
|
||||||
const minWidth = getMinWidth(table);
|
|
||||||
const widths = getDefaultWidths(table, headers, minWidth);
|
|
||||||
try {
|
|
||||||
window.localStorage.removeItem(getStorageKey(table));
|
|
||||||
} catch (error) {
|
|
||||||
// Storage can be unavailable in privacy-restricted browser contexts.
|
|
||||||
}
|
|
||||||
applyWidths(table, widths, minWidth);
|
|
||||||
};
|
|
||||||
|
|
||||||
const resizeColumn = (table, index, delta, persist) => {
|
const resizeColumn = (table, index, delta, persist) => {
|
||||||
const widths = [...table._largeTableColumnWidths];
|
const widths = [...table._largeTableColumnWidths];
|
||||||
const minWidth = getMinWidth(table);
|
const minWidth = getMinWidth(table);
|
||||||
@@ -225,12 +213,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
table.addEventListener('click', (event) => {
|
|
||||||
const reset = event.target.closest('[data-large-table-reset-widths]');
|
|
||||||
if (reset && table.contains(reset)) {
|
|
||||||
resetWidths(table);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
window.sgInitLargeTableColumnResize = (options = {}) => {
|
window.sgInitLargeTableColumnResize = (options = {}) => {
|
||||||
|
|||||||
@@ -173,20 +173,6 @@
|
|||||||
outline-offset: -1px;
|
outline-offset: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sg-large-table__reset-widths {
|
|
||||||
flex: 0 0 auto;
|
|
||||||
border: var(--border-none);
|
|
||||||
background: var(--color-transparent);
|
|
||||||
color: var(--color-font-light);
|
|
||||||
font: inherit;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sg-large-table__reset-widths:focus-visible {
|
|
||||||
outline: 2px solid var(--color-font-light);
|
|
||||||
outline-offset: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sg-large-table__sort-button {
|
.sg-large-table__sort-button {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in new issue
Block a user