sp-dev-fx-property-controls icon indicating copy to clipboard operation
sp-dev-fx-property-controls copied to clipboard

Add and Save for PropertyFieldCollectionData Not Being Activated with CustomCollectionData

Open walleford opened this issue 2 years ago • 1 comments

Category

  • [ ] Enhancement
  • [X ] Bug
  • [ ] Question

Version

Please specify what version of the library you are using: [ 3.7.2 ]

Expected / Desired Behavior / Question

I have a nested FieldCollectionData within my PropertyFieldCollectionData, and when updating the nested FieldCollectionData, the add and save button for the parent one does not become available unless I type in some other text box. This also happens when uploading with PropertyFieldFilePicker, the add and save does not become available unless typing in any other text box in the collection.

{
                          id: "dropData",
                          title: "Manage Drop Data",
                          type: CustomCollectionFieldType.custom,
                          onCustomRender: (field, value, onUpdate, item, itemId, onError) => {
                              return (
                                  React.createElement(FieldCollectionData, {
                                      key: itemId,
                                      panelHeader: "Drop Data Panel",
                                      manageBtnLabel: "Manage drop data",
                                      fields: [
                                          {
                                              id: "Title",
                                              title: "Item Title",
                                              type: CustomCollectionFieldType.string,
                                          },
                                          {
                                              id: "Link",
                                              title: "Item Hyperlink",
                                              type: CustomCollectionFieldType.url,
                                          },
                                      ],
                                      value: item.dropData,
                                      disabled: item.isDropdown ? false : true,
                                      onChanged: (items) => {
                                          onUpdate(field.id, items);
                                          this.onPropertyPaneFieldChanged.bind(this);
                                          this.context.propertyPane.refresh();
                                      },
                                  })
                                  )
                          }
                    },

This is my code for the nested collection data. Is there any way to make this trigger the add and save button for the parent collection?

walleford avatar Jul 15 '22 14:07 walleford

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msftbot[bot] avatar Jul 15 '22 14:07 msftbot[bot]