diff --git a/frontend/src/AppBuilder/Widgets/NewTable/Table.jsx b/frontend/src/AppBuilder/Widgets/NewTable/Table.jsx index 1d30da2a98..e510483f72 100644 --- a/frontend/src/AppBuilder/Widgets/NewTable/Table.jsx +++ b/frontend/src/AppBuilder/Widgets/NewTable/Table.jsx @@ -96,8 +96,8 @@ export const Table = memo( // Set styles to the table store useEffect(() => { - setTableStyles(id, styles); - }, [id, styles, setTableStyles]); + setTableStyles(id, styles, darkMode); + }, [id, styles, darkMode, setTableStyles]); // Set events to the table store useEffect(() => { diff --git a/frontend/src/AppBuilder/Widgets/NewTable/_components/DataTypes/CustomSelect.jsx b/frontend/src/AppBuilder/Widgets/NewTable/_components/DataTypes/CustomSelect.jsx index f9a89fee17..c3f4195a1a 100644 --- a/frontend/src/AppBuilder/Widgets/NewTable/_components/DataTypes/CustomSelect.jsx +++ b/frontend/src/AppBuilder/Widgets/NewTable/_components/DataTypes/CustomSelect.jsx @@ -8,6 +8,7 @@ import OverlayTrigger from 'react-bootstrap/OverlayTrigger'; import { isArray } from 'lodash'; import useStore from '@/AppBuilder/_stores/store'; import { shallow } from 'zustand/shallow'; +import useTextColor from '../DataTypes/_hooks/useTextColor'; const { MenuList } = components; @@ -136,12 +137,14 @@ export const CustomSelectColumn = ({ isEditable, column, isNewRow, + id, }) => { const validateWidget = useStore((state) => state.validateWidget, shallow); const [isFocused, setIsFocused] = useState(false); const containerRef = useRef(null); const inputRef = useRef(null); + const cellTextColor = useTextColor(id, textColor); const validationData = validateWidget({ validationObject: { @@ -184,7 +187,7 @@ export const CustomSelectColumn = ({ padding: '2px 6px', background: 'var(--surfaces-surface-03)', borderRadius: '6px', - color: textColor || 'var(--text-primary)', + color: cellTextColor || 'var(--text-primary)', fontSize: '12px', }), }), @@ -211,11 +214,11 @@ export const CustomSelectColumn = ({ padding: '2px 6px', background: 'var(--surfaces-surface-03)', borderRadius: '6px', - color: textColor || 'var(--text-primary)', + color: cellTextColor || 'var(--text-primary)', fontSize: '12px', }), }), - [darkMode, isMulti, horizontalAlignment, textColor] + [darkMode, isMulti, horizontalAlignment, cellTextColor] ); const defaultValue = useMemo( @@ -275,7 +278,7 @@ export const CustomSelectColumn = ({ > <>