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

Fix for #1775 and #1760 #1781

Merged
merged 7 commits into from
Nov 12, 2024
Merged

Fix for #1775 and #1760 #1781

merged 7 commits into from
Nov 12, 2024

Conversation

wuxiaojun514
Copy link
Contributor

Q A
Bug fix? [ x]
New feature? [ ]
New sample? [ ]
Related issues? fixes #1775 #1760

What's in this Pull Request?

This pull request is to fix two issues on required field validation issues in Dynamic Form control
Dynamic Form has done huge refactoring on version 3.17. See pull request 1672 for detail

The root cause of issue #1760 is due to the initial value of newValue has been changed from "null" to "undefined". So I modified the related code to "undefined" as well.

Regarding #1775 , now changedValue won't use loaded item's value as initial value. So I added another check to compare with value when there is no new value on this field.

@6gal6ler6
Copy link
Contributor

@wuxiaojun514

Thanks for taking care of this issue!!!

@devspfx
Copy link

devspfx commented Mar 25, 2024

When will be this fix available? When we will have a new release?

@joelfmrodrigues
Copy link
Collaborator

Waiting for #1726

Migrate from Original Dev Branch
@devspfx
Copy link

devspfx commented Aug 28, 2024

@joelfmrodrigues any news about this issue? We hope to have a resolution

Merge from Main Dev Branch to my personal dev branch
Sync the latest dev branch
@martinlingstuyl
Copy link
Contributor

Waiting for #1726

Hi @joelfmrodrigues, why is this PR dependant on the #1726? It seems to be unrelated: editing filenames versus required fields showing a message.

It would be nice if we could ditch the dependency and get this fixed soon. (I've got customers running into this as well...) If I can help with any of this, do let me know!

@joelfmrodrigues
Copy link
Collaborator

Hey @martinlingstuyl I will have a look and likely merge this one as the other PR has unresolved conflicts for a long time. I haven't been active for a while for personal reasons (new kid and too much work 😅) but trying to get my head back into this and will try to look into this later today or over the weekend

@martinlingstuyl
Copy link
Contributor

Great to hear @joelfmrodrigues! Yeah, personal reasons enough that can lower your available time in open source. also on my end recently. I know how it goes 😀

Do let me know if I can be of help...

@joelfmrodrigues joelfmrodrigues merged commit 484ff24 into pnp:dev Nov 12, 2024
1 check passed
@joelfmrodrigues
Copy link
Collaborator

@wuxiaojun514 This is now merged. I'm really sorry for the time it took to merge
Thanks for the great work and clean code change

@joelfmrodrigues
Copy link
Collaborator

@6gal6ler6 @devspfx @martinlingstuyl this is now merged, apologies for the delay

@joelfmrodrigues joelfmrodrigues added this to the 3.20.0 milestone Nov 12, 2024
@martinlingstuyl
Copy link
Contributor

That's great to hear @joelfmrodrigues! My customer is going to be super excited 😀

What's the release date for 3.20?

@joelfmrodrigues
Copy link
Collaborator

@martinlingstuyl no date scheduled yet, but I will start the discussion on this as I can see there are several fixes/improvements already in this beta

@martinlingstuyl
Copy link
Contributor

Maybe I can fix the PR assigned to me first.😊 I'll see if I can make haste there

@martinlingstuyl
Copy link
Contributor

Hi @joelfmrodrigues,

I now see why you related this pr to #1726:

The testform now only works if I include FileLeafRef in the hiddenFields array. If I do not do that, submitting the form fails without an error. (due to the fact that the dynamic form currently cannot render File type Fields.

What I'm now using in TestForm.tsx:

<DynamicForm
          context={this.props.context}
          contentTypeId='0x0120D52000796BC7FCC8B819488729FB2B77B0E799002B2379630DCCB04D883603B763E843D7'
          listId={this.props.context.list.guid.toString()}
          listItemId={this.props.context.itemId}
          hiddenFields={['FileLeafRef']}
          onListItemLoaded={async (listItemData: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
            console.log(listItemData);
          }} />

FYI

@6gal6ler6
Copy link
Contributor

Will the branch conflicts of #1726 be resolved?

I see that @gruizdev is not responsive on that PR

@joelfmrodrigues
Copy link
Collaborator

Hi @joelfmrodrigues,

I now see why you related this pr to #1726:

The testform now only works if I include FileLeafRef in the hiddenFields array. If I do not do that, submitting the form fails without an error. (due to the fact that the dynamic form currently cannot render File type Fields.

What I'm now using in TestForm.tsx:

<DynamicForm
          context={this.props.context}
          contentTypeId='0x0120D52000796BC7FCC8B819488729FB2B77B0E799002B2379630DCCB04D883603B763E843D7'
          listId={this.props.context.list.guid.toString()}
          listItemId={this.props.context.itemId}
          hiddenFields={['FileLeafRef']}
          onListItemLoaded={async (listItemData: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
            console.log(listItemData);
          }} />

FYI

Ouch, I missed this, thanks for reporting back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants