mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
feat(frontend): Replace ESLint with OXC hybrid linting architecture (#35506)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -227,7 +227,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
|
||||
const handleChangeSearchCol = (searchCol: string) => {
|
||||
if (!isEqual(searchCol, serverPaginationData?.searchColumn)) {
|
||||
const modifiedOwnState = {
|
||||
...(serverPaginationData || {}),
|
||||
...serverPaginationData,
|
||||
searchColumn: searchCol,
|
||||
searchText: '',
|
||||
};
|
||||
@@ -238,7 +238,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
|
||||
const handleSearch = useCallback(
|
||||
(searchText: string) => {
|
||||
const modifiedOwnState = {
|
||||
...(serverPaginationData || {}),
|
||||
...serverPaginationData,
|
||||
searchColumn:
|
||||
serverPaginationData?.searchColumn || searchOptions[0]?.value,
|
||||
searchText,
|
||||
|
||||
@@ -355,7 +355,7 @@ const buildQuery: BuildQuery<TableChartFormData> = (
|
||||
) {
|
||||
queryObject = { ...queryObject, row_offset: 0 };
|
||||
const modifiedOwnState = {
|
||||
...(options?.ownState || {}),
|
||||
...options?.ownState,
|
||||
currentPage: 0,
|
||||
pageSize: queryObject.row_limit ?? 0,
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { styled } from '@superset-ui/core';
|
||||
import { styled, useTheme } from '@superset-ui/core';
|
||||
import { CustomCellRendererProps } from '@superset-ui/core/components/ThemedAgGridReact';
|
||||
import { BasicColorFormatterType, InputColumn } from '../types';
|
||||
import { useIsDark } from '../utils/useTableTheme';
|
||||
@@ -109,13 +109,15 @@ function cellBackground({
|
||||
value,
|
||||
colorPositiveNegative = false,
|
||||
isDarkTheme = false,
|
||||
theme,
|
||||
}: {
|
||||
value: number;
|
||||
colorPositiveNegative: boolean;
|
||||
isDarkTheme: boolean;
|
||||
theme: any;
|
||||
}) {
|
||||
if (!colorPositiveNegative) {
|
||||
return isDarkTheme ? 'rgba(255,255,255,0.2)' : 'rgba(0,0,0,0.2)'; // transparent or neutral
|
||||
return 'transparent'; // Use transparent background when colorPositiveNegative is false
|
||||
}
|
||||
|
||||
const r = value < 0 ? 150 : 0;
|
||||
@@ -150,6 +152,7 @@ export const NumericCellRenderer = (
|
||||
} = params;
|
||||
|
||||
const isDarkTheme = useIsDark();
|
||||
const theme = !colorPositiveNegative ? null : useTheme();
|
||||
|
||||
if (node?.rowPinned === 'bottom') {
|
||||
return <StyledTotalCell>{valueFormatted ?? value}</StyledTotalCell>;
|
||||
@@ -195,6 +198,7 @@ export const NumericCellRenderer = (
|
||||
value: value as number,
|
||||
colorPositiveNegative,
|
||||
isDarkTheme,
|
||||
theme,
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
@@ -42,7 +42,7 @@ export const getCrossFilterDataMask = ({
|
||||
isActiveFilterValue,
|
||||
timestampFormatter,
|
||||
}: GetCrossFilterDataMaskProps) => {
|
||||
let updatedFilters = { ...(filters || {}) };
|
||||
let updatedFilters = { ...filters };
|
||||
if (filters && isActiveFilterValue(key, value)) {
|
||||
updatedFilters = {};
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user