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 super.toggleCheckbox bug #5004

Merged
merged 10 commits into from
Mar 19, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@uppy/google-drive/src/DriveProviderViews.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class DriveProviderViews<
M extends Meta,
B extends Body,
> extends ProviderViews<M, B> {
toggleCheckbox = (e: Event, file: CompanionFile): void => {
toggleCheckbox(e: Event, file: CompanionFile): void {
e.stopPropagation()
e.preventDefault()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export default class ProviderView<M extends Meta, B extends Body> extends View<
const targetViewOptions = { ...this.opts, ...viewOptions }
const { files, folders, filterInput, loading, currentSelection } =
this.plugin.getPluginState()
const { isChecked, toggleCheckbox, recordShiftKeyPress, filterItems } = this
const { isChecked, recordShiftKeyPress, filterItems } = this
const hasInput = filterInput !== ''
const pluginIcon = this.plugin.icon || defaultPickerIcon

Expand All @@ -575,7 +575,7 @@ export default class ProviderView<M extends Meta, B extends Body> extends View<

const browserProps = {
isChecked,
toggleCheckbox,
toggleCheckbox: this.toggleCheckbox.bind(this),
recordShiftKeyPress,
currentSelection,
files: hasInput ? filterItems(files) : files,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ export default class SearchProviderView<
const targetViewOptions = { ...this.opts, ...viewOptions }
const { files, folders, filterInput, loading, currentSelection } =
this.plugin.getPluginState()
const { isChecked, toggleCheckbox, filterItems, recordShiftKeyPress } = this
const { isChecked, filterItems, recordShiftKeyPress } = this
const hasInput = filterInput !== ''

const browserProps = {
isChecked,
toggleCheckbox,
toggleCheckbox: this.toggleCheckbox.bind(this),
recordShiftKeyPress,
currentSelection,
files: hasInput ? filterItems(files) : files,
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/provider-views/src/View.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default class View<
* toggle multiple checkboxes at once, which is done by getting all files
* in between last checked file and current one.
*/
toggleCheckbox = (e: Event, file: CompanionFile): void => {
toggleCheckbox(e: Event, file: CompanionFile): void {
e.stopPropagation()
e.preventDefault()
;(e.currentTarget as HTMLInputElement).focus()
Expand Down