Skip to content

Commit

Permalink
add eslint ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
blimmer committed Dec 20, 2023
1 parent 94ea903 commit 5e4c621
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Table/utils/ColumnState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export class ColumnState<R extends Kinded> {
this.visible = storage.wasVisible(column.id) ?? (column.canHide ? column.initVisible ?? false : true);
if (this.visible && (storage.wasExpanded(column.id) ?? column.initExpanded)) {
this.expanded = true;
// TODO: verify this eslint ignore
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.doExpand();
}
makeAutoObservable(this, { column: observable.ref }, { name: `ColumnState@${column.id}` });
Expand All @@ -38,6 +40,8 @@ export class ColumnState<R extends Kinded> {
// If an expandable header is becoming visible for the 1st time, expand it
if (!wasVisible && visible && this.column.initExpanded && this.children === undefined) {
this.expanded = true;
// TODO: verify this eslint ignore
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.doExpand();
}
}
Expand All @@ -52,6 +56,8 @@ export class ColumnState<R extends Kinded> {
// The first time we expand, fetch our children. Note that ExpandableHeader
// technically pre-loads our children, so it can show a spinner while loading,
// and only after loading is complete, tell our column to expand.
// TODO: verify this eslint ignore
// eslint-disable-next-line @typescript-eslint/no-floating-promises
if (!wasExpanded) this.doExpand();
}

Expand Down
2 changes: 2 additions & 0 deletions src/components/Table/utils/ColumnStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export class ColumnStates<R extends Kinded> {
} else {
existing.column = column;
// Any time a column is re-added (i.e. props.columns changed), re-expand it
// TODO: verify this eslint ignore
// eslint-disable-next-line @typescript-eslint/no-floating-promises
if (existing.isExpanded) existing.doExpand(true);
return existing;
}
Expand Down
2 changes: 2 additions & 0 deletions src/inputs/TreeSelectField/TreeSelectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ function TreeSelectFieldBase<O, V extends Value>(props: TreeSelectFieldProps<O,
const firstOpen = useRef(true);
function onOpenChange(isOpen: boolean) {
if (firstOpen.current && isOpen) {
// TODO: verify this eslint ignore
// eslint-disable-next-line @typescript-eslint/no-floating-promises
maybeInitLoad(options, fieldState, setFieldState);
firstOpen.current = false;
}
Expand Down
2 changes: 2 additions & 0 deletions src/inputs/internal/ComboBoxBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ export function ComboBoxBase<O, V extends Value>(props: ComboBoxBaseProps<O, V>)
const firstOpen = useRef(true);
function onOpenChange(isOpen: boolean) {
if (firstOpen.current && isOpen) {
// TODO: verify this eslint ignore
// eslint-disable-next-line @typescript-eslint/no-floating-promises
maybeInitLoad();
firstOpen.current = false;
}
Expand Down
6 changes: 6 additions & 0 deletions src/utils/rtl.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ describe("rtl", () => {
label="Number"
value={undefined as any}
onSelect={(v, o) => {
// TODO: verify this eslint ignore
// eslint-disable-next-line @typescript-eslint/no-floating-promises
asyncSelect(v, o);
}}
options={[
Expand Down Expand Up @@ -219,6 +221,8 @@ describe("rtl", () => {
label="Number"
values={undefined as any}
onSelect={(v, o) => {
// TODO: verify this eslint ignore
// eslint-disable-next-line @typescript-eslint/no-floating-promises
asyncSelect(v, o);
}}
options={[
Expand Down Expand Up @@ -317,6 +321,8 @@ describe("rtl", () => {
label="Number"
values={[] as string[]}
onSelect={({ all }) => {
// TODO: verify this eslint ignore
// eslint-disable-next-line @typescript-eslint/no-floating-promises
asyncSelect(all);
}}
options={
Expand Down

0 comments on commit 5e4c621

Please sign in to comment.