rowy icon indicating copy to clipboard operation
rowy copied to clipboard

Toggle field - Add customization options

Open harinij opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. Currently, the "Toggle" field does have customization to change the color from green to anything else

Describe the solution you'd like Allow in the UI option for users to add color hex or color picker to add to their toggle button.

harinij avatar Sep 30 '21 16:09 harinij

Please assign me to do this.

yasinbordbar avatar Sep 30 '21 16:09 yasinbordbar

Can this be assigned to me please?

ChinazoOnwukaike avatar Sep 15 '22 22:09 ChinazoOnwukaike

@ChinazoOnwukaike please let us know if you are still working on this or if you need any inputs. Unassigning for now.

harinij avatar Nov 18 '22 07:11 harinij

Hi @harinij I am working on this: https://github.com/rowyio/rowy/commit/ef4fa7d4818d118f9be304033847096904d9217c

Color pick modal is added.

Commit: https://github.com/RajGM/rowy/commit/ef4fa7d4818d118f9be304033847096904d9217c

Remaining: Coloring of the table cell based on true/false; ColorModal

RajGM avatar Apr 22 '23 23:04 RajGM

Hi @harinij

Is your feature request related to a problem? Please describe. Currently, the "Toggle" field doesn't have customization to change the color from green to anything else

Does that means we are only looking to change the color or toggle button instead of whole cell?

RajGM avatar Apr 24 '23 08:04 RajGM

Switch

RajGM avatar Apr 24 '23 08:04 RajGM

Hi @shamsmosowi and @BeeBombshell

for the src>components>fields>Checkbox>EditorCell.tsx

` return ( <FormControlLabel control={ <Switch checked={!!value} onChange={handleChange} disabled={disabled} tabIndex={tabIndex} size="small" sx={{

        }}
      />
  }
  label={column.name as string}
  labelPlacement="start"
  sx={{
    m: 0,
    width: "100%",
    alignItems: "center",

    "& .MuiFormControlLabel-label": {
      font: "inherit",
      letterSpacing: "inherit",
      flexGrow: 1,
      overflowX: "hidden",
      mt: "0 !important",
    },

    "& .MuiSwitch-root": { mr: -0.75 },
  }}
/>

);`

Color properties are working for toggled off state with sx props but not for toggled On props.

Link to push: https://github.com/RajGM/rowy/commit/09ae503e18754127d73206e32f6197a7055f1ee1

RajGM avatar Apr 24 '23 14:04 RajGM

Even if I try to copy the styling from: https://mui-treasury.com/styles/switch/

It's not working.

RajGM avatar Apr 24 '23 14:04 RajGM

@iamanishroy

RajGM avatar Apr 24 '23 14:04 RajGM

Hi @RajGM thanks for pointing it out. Looks like this would not be a feasible solution so we are closing the issue.

harinij avatar Apr 26 '23 13:04 harinij