* FIX-6783 : Checkbox group widget - Feedback -- Add default border for a checkbox icon and color for a label -- Align the option to the center if its options count is one or inline -- Set isInline to true by default in widget config * FIX-6783 : Checkbox Group Widget Feedback -- Add a migration for isInline property * Feat: Checkbox Groupd Widget Feedback -- Add vertical margin between options * Fix: Checkbox Group Widget -- Increase default rows value to 1.5 in widget configuration * Fix: Checkbox Group Widget -- Change the migration version number * Fix: Checkbox Group Widget -- Change migration version number * Fix: Checkbox Groupd Widget Feedback -- Delete redundant WidgetConfigResponse file * Fix: Checkbox Group Widget Feedback -- Change the config values of rows, columns -- Refactor migration file * Fix: Checkbox Group Widget -- Refactor migration file * fix: Checkbox Group Widget Feedback -- Fix on the wrong dsl version * fix: Checkbox Group Widget Feedback -- Remove a unnecessary comment -- Update the version of the widget in its config and migration * fix: checkbox group feedback -- Rewrite a migration for isInline property * fix: checkbox group feedback -- Follow the figma design on disabled state * fix: Checkbox Group Widget feedback -- Apply appropriate migration * fix: Checkbox group widget - Feedback -- Apply theme changes * fix: Checkbox Group Widget - Feedback -- Change the border color of an unchecked checkbox to DARK_GRAY * fix: Checkbox Group Widget - Feedback -- Remove inset box shadow from the checkbox indicators Co-authored-by: Arpit Mohan <arpit@appsmith.com>
20 lines
591 B
TypeScript
20 lines
591 B
TypeScript
import { WidgetProps } from "widgets/BaseWidget";
|
|
import { DSLWidget } from "widgets/constants";
|
|
|
|
export const migrateCheckboxGroupWidgetInlineProperty = (
|
|
currentDSL: DSLWidget,
|
|
) => {
|
|
currentDSL.children = currentDSL.children?.map((child: WidgetProps) => {
|
|
if (child.type === "CHECKBOX_GROUP_WIDGET") {
|
|
if (child.version === 1) {
|
|
child.isInline = true;
|
|
child.version = 2;
|
|
}
|
|
} else if (child.children && child.children.length > 0) {
|
|
child = migrateCheckboxGroupWidgetInlineProperty(child);
|
|
}
|
|
return child;
|
|
});
|
|
return currentDSL;
|
|
};
|