mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 22:38:56 +08:00
chore: fix eslint in blocksuite (#9232)
This commit is contained in:
@@ -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 = '';
|
||||
|
||||
+1
-1
@@ -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');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user