[UPDT] BASE: Select/ Unselect all row features in toggle columns

This commit is contained in:
Horilla
2024-02-12 12:44:12 +05:30
parent 7573964929
commit c33281d8f2

View File

@@ -30,6 +30,13 @@ function toggleColumns(tableId, fieldContainer) {
const element = trs[tr];
trsString = trsString + element
}
let selectButtons = $(`
<div class="oh-dropdown_btn-header">
<button onclick="$(this).parent().parent().find('[type=checkbox]').prop('checked',true).change()" class="oh-btn oh-btn--success-outline">Select All Rows</button>
<button onclick="$(this).parent().parent().find('[type=checkbox]').prop('checked',false).change()" class="oh-btn oh-btn--primary-outline">Unselect All Rows</button>
</div>
`)
$(`#${fieldContainer}`).parent().prepend(selectButtons)
$(`#${fieldContainer}`).html(trsString);
if (visibleCells) {
storedIds = JSON.parse(visibleCells)