Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fw-platform-table: Unable to drag and drop fields on custom objects #958

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ describe('fw-datepicker', () => {
const page = await newE2EPage();
const fullyear = new Date().getFullYear();
await page.setContent(
'<fw-datepicker mode="range" min-year="2020" min-date="2020-07-31"></fw-datepicker>'
'<fw-datepicker mode="range" min-year="2020" min-date="2020-07-31" value="2020-07-25 to 2020-07-31"></fw-datepicker>'
);
await page.waitForChanges();
const dp = await page.find('fw-datepicker');
Expand Down
4 changes: 2 additions & 2 deletions packages/crayons-core/src/utils/draggable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ export class Draggable {
const isSectionFieldLimitExceeded =
this.dragContainer?.children?.length > 15;

// Check if the field is required
const isFieldRequired = dragElement.dataProvider.required;
// Check if the dragElement is present and the field is required
const isFieldRequired = dragElement?.dataProvider?.required;
return (
isSection &&
(isFieldTypeNotAllowed ||
Expand Down
Loading