Skip to content

Commit

Permalink
Merge pull request #367 from shesha-io/fix/ps/timeline-width-fix
Browse files Browse the repository at this point in the history
Fix : fix auto sizing of timeline item
  • Loading branch information
pholoshos committed Jul 13, 2023
2 parents 24b5fc1 + bfe8572 commit b5b6f96
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ const TimelineComponent: IToolboxComponent<ITimelineProps> = {
const { formData } = useForm();
const ownerId = evaluateValue(model.ownerId, { data: formData });

return (
<ConfigurableFormItem model={{ ...model }} valuePropName="checked" initialValue={model?.defaultValue}>
<ShaTimeline {...model} ownerId={ownerId} />
</ConfigurableFormItem>
);
return <ShaTimeline {...model} ownerId={ownerId} />;
},

settingsFormFactory: ({ readOnly, model, onSave, onCancel, onValuesChange }) => {
Expand All @@ -41,20 +37,20 @@ const TimelineComponent: IToolboxComponent<ITimelineProps> = {
/>
);
},
migrator: m =>
m.add<ITimelineProps>(0, prev => {
migrator: (m) =>
m.add<ITimelineProps>(0, (prev) => {
const result: ITimelineProps = {
...prev,
entityType: prev['entityType'],
};
const useExpression = Boolean(result['useExpression']);
delete result['useExpression'];
if (useExpression){

if (useExpression) {
const migratedExpression = migrateDynamicExpression(prev['filters'] ?? {});
result.filters = migratedExpression;
}

return result;
}),
};
Expand Down

0 comments on commit b5b6f96

Please sign in to comment.