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

fix: typo in setColumnVisibiliy, fixes #1056 #1057

Merged
merged 1 commit into from
Sep 7, 2024
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
4 changes: 2 additions & 2 deletions examples/example-column-hidden.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h2>Demonstrates:</h2>
</ul>
<h2>View Source:</h2>
<ul>
<li><A href="https://github.com/6pac/SlickGrid/blob/master/examples/example-column-visible.html" target="_sourcewindow"> View the source for this example on Github</a></li>
<li><A href="https://github.com/6pac/SlickGrid/blob/master/examples/example-column-hidden.html" target="_sourcewindow"> View the source for this example on Github</a></li>
</ul>

</div>
Expand Down Expand Up @@ -265,7 +265,7 @@ <h2>View Source:</h2>
var hideCol = document.querySelector('#chkHideColumn').checked || false;

// use the columnpicker since it keeps a full list of columns, hidden and visible
columnpicker.setColumnVisibiliy('duration', !hideCol);
columnpicker.setColumnVisibility('duration', !hideCol);
});

// initialize the model after all the events have been hooked up
Expand Down
5 changes: 5 additions & 0 deletions src/controls/slick.columnmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,12 @@ export class SlickColumnMenu {
}
}

/** @deprecated because of a typo @use `setColumnVisibility()` instead */
setColumnVisibiliy(idxOrId: number | string, show: boolean) {
this.setColumnVisibility(idxOrId, show);
}

setColumnVisibility(idxOrId: number | string, show: boolean) {
const idx = typeof idxOrId === 'number' ? idxOrId : this.getColumnIndexbyId(idxOrId);
let visibleColumns: Column[] = this.getVisibleColumns();
const col = this.columns[idx];
Expand Down
5 changes: 5 additions & 0 deletions src/controls/slick.columnpicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,12 @@ export class SlickColumnPicker {
}
}

/** @deprecated because of a typo @use `setColumnVisibility()` instead */
setColumnVisibiliy(idxOrId: number | string, show: boolean) {
this.setColumnVisibility(idxOrId, show);
}

setColumnVisibility(idxOrId: number | string, show: boolean) {
const idx = typeof idxOrId === 'number' ? idxOrId : this.getColumnIndexbyId(idxOrId);
let visibleColumns = this.getVisibleColumns();
const col = this.columns[idx];
Expand Down