mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
removed occasional changes related to typescript 4.1
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
39fc5a7f84
commit
99c613546e
9 files changed
+30
-25
No files matched your search
@@ -50,7 +50,7 @@ export class Select extends React.Component<SelectProps> {
|
||||
}),
|
||||
};
|
||||
|
||||
protected isValidOption(opt: SelectOption | any): opt is SelectOption {
|
||||
protected isValidOption(opt: SelectOption | any) {
|
||||
return typeof opt === "object" && opt.value !== undefined;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export class Select extends React.Component<SelectProps> {
|
||||
const { autoConvertOptions, options } = this.props;
|
||||
|
||||
if (autoConvertOptions && Array.isArray(options)) {
|
||||
return (options as any[]).map(opt => {
|
||||
return options.map(opt => {
|
||||
return this.isValidOption(opt) ? opt : { value: opt, label: String(opt) };
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import "./table.scss";
|
||||
|
||||
import React from "react";
|
||||
import lodash from "lodash";
|
||||
import { orderBy } from "lodash";
|
||||
import { observer } from "mobx-react";
|
||||
import { observable } from "mobx";
|
||||
import { autobind, cssNames, noop } from "../../utils";
|
||||
@@ -104,10 +104,10 @@ export class Table extends React.Component<TableProps> {
|
||||
}
|
||||
|
||||
getSorted(items: any[]) {
|
||||
const { sortBy, orderBy } = this.sortParams;
|
||||
const { sortBy, orderBy: order } = this.sortParams;
|
||||
const sortingCallback = this.props.sortable[sortBy] || noop;
|
||||
|
||||
return lodash.orderBy(items, sortingCallback, orderBy as any);
|
||||
return orderBy(items, sortingCallback, order as any);
|
||||
}
|
||||
|
||||
@autobind()
|
||||
|
||||
@@ -15,8 +15,8 @@ export interface UrlParamInit<V = any> {
|
||||
export class UrlParam<V = any | any[]> {
|
||||
static SYSTEM_PREFIX = "lens-";
|
||||
|
||||
public name: string;
|
||||
public urlName: string;
|
||||
readonly name: string;
|
||||
readonly urlName: string;
|
||||
|
||||
constructor(private init: UrlParamInit<V>, private history: IObservableHistory) {
|
||||
const { isSystem, name, skipEmpty = true } = init;
|
||||
|
||||
Reference in new issue
Block a user