Bläddra i källkod

Boolean table cell in edit mode (#2258) (#2260)

resolves #2257

Co-authored-by: Fred Lefévère-Laoide <Fred.Lefevere-Laoide@Taipy.io>
Fred Lefévère-Laoide 6 månader sedan
förälder
incheckning
a841494e70
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3 2
      frontend/taipy-gui/src/components/Taipy/tableUtils.tsx

+ 3 - 2
frontend/taipy-gui/src/components/Taipy/tableUtils.tsx

@@ -548,7 +548,7 @@ export const EditableCell = (props: EditableCellProps) => {
                 {edit ? (
                     colDesc.type?.startsWith("bool") ? (
                         <Box sx={cellBoxSx}>
-                            lightBool ? (
+                            {useCheckbox ? (
                             <input
                                 type="checkbox"
                                 checked={val as boolean}
@@ -568,7 +568,7 @@ export const EditableCell = (props: EditableCellProps) => {
                                 inputRef={setInputFocus}
                                 className={getSuffixedClassNames(tableClassName, "-bool")}
                             />
-                            )
+                            )}
                             <Box sx={iconsWrapperSx}>
                                 <IconButton onClick={onCheckClick} size="small" sx={iconInRowSx}>
                                     <CheckIcon fontSize="inherit" />
@@ -724,6 +724,7 @@ export const EditableCell = (props: EditableCellProps) => {
                                     checked={value as boolean}
                                     title={boolTitle}
                                     style={defaultCursor}
+                                    readOnly
                                     className={getSuffixedClassNames(tableClassName, "-bool")}
                                 />
                             ) : (