mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
feat(fe): upgrade superset-frontend to Typescript v5 (#31979)
Signed-off-by: hainenber <dotronghai96@gmail.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
This commit is contained in:
@@ -60,11 +60,12 @@ export function generatePageItems(
|
||||
items[i] = i + left;
|
||||
}
|
||||
// replace non-ending items with placeholders
|
||||
if (items[0] > 0) {
|
||||
if (typeof items[0] === 'number' && items[0] > 0) {
|
||||
items[0] = 0;
|
||||
items[1] = 'prev-more';
|
||||
}
|
||||
if (items[items.length - 1] < total - 1) {
|
||||
const lastItem = items[items.length - 1];
|
||||
if (typeof lastItem === 'number' && lastItem < total - 1) {
|
||||
items[items.length - 1] = total - 1;
|
||||
items[items.length - 2] = 'next-more';
|
||||
}
|
||||
|
||||
@@ -649,9 +649,11 @@ const config: ControlPanelConfig = {
|
||||
(colname: string, index: number) =>
|
||||
coltypes[index] === GenericDataType.Numeric,
|
||||
)
|
||||
.map(colname => ({
|
||||
.map((colname: string) => ({
|
||||
value: colname,
|
||||
label: verboseMap[colname] ?? colname,
|
||||
label: Array.isArray(verboseMap)
|
||||
? colname
|
||||
: verboseMap[colname],
|
||||
}))
|
||||
: [];
|
||||
const columnOptions = explore?.controls?.time_compare?.value
|
||||
|
||||
Reference in New Issue
Block a user