chore: fix eslint in blocksuite (#9232)

This commit is contained in:
Saul-Mirone
2024-12-20 16:48:10 +00:00
parent bfcc53dc1f
commit 3a82da0e5b
269 changed files with 935 additions and 842 deletions
@@ -93,7 +93,7 @@ export class DataViewHeaderToolsSearch extends WidgetBase<
> {
static override styles = styles;
private _clearSearch = () => {
private readonly _clearSearch = () => {
this._searchInput.value = '';
this.view.setSearch('');
this.preventBlur = true;
@@ -102,25 +102,25 @@ export class DataViewHeaderToolsSearch extends WidgetBase<
});
};
private _clickSearch = (e: MouseEvent) => {
private readonly _clickSearch = (e: MouseEvent) => {
e.stopPropagation();
this.showSearch = true;
};
private _onSearch = (event: InputEvent) => {
private readonly _onSearch = (event: InputEvent) => {
const el = event.target as HTMLInputElement;
const inputValue = el.value.trim();
this.view.setSearch(inputValue);
};
private _onSearchBlur = () => {
private readonly _onSearchBlur = () => {
if (this._searchInput.value || this.preventBlur) {
return;
}
this.showSearch = false;
};
private _onSearchKeydown = (event: KeyboardEvent) => {
private readonly _onSearchKeydown = (event: KeyboardEvent) => {
if (event.key === 'Escape') {
if (this._searchInput.value) {
this._searchInput.value = '';
@@ -19,7 +19,7 @@ const styles = css`
export class DataViewHeaderToolsAddRow extends WidgetBase {
static override styles = styles;
private _onAddNewRecord = () => {
private readonly _onAddNewRecord = () => {
if (this.readonly) return;
this.viewMethods.addRow?.('start');
};