Skip to content

Refresh List or Listitem via Field Customizer or Command Set #1449

@OliverZeiser

Description

@OliverZeiser

Category

  • Question
  • Typo
  • Bug

Expected or Desired Behavior

When using a Field Customizer (e.g. a slider or toggle...) to quickly update a fields value directly from within the listview, the changes are not picked up by the ootb list control. The value gets updated just fine, but if you click on view or edit item after that, the changes are not reflected there.
Is there a way to refresh the list? We used to be able to do this in classic like this:
// Set Ajax refresh context var evtAjax = { currentCtx: ctx, csrAjaxRefresh: true }; // Initiate Ajax Refresh on the list AJAXRefreshView(evtAjax, SP.UI.DialogResult.OK);

Observed Behavior

Currently the list is in the wrong state if updating the list via field customizer or command set. Changes done to the item/items via spfx customization are not picked up by the list until we do a full page refresh.

Steps to Reproduce

Look at those examples, edit a value using the field customizer and then click on view or edit item. You will see the changes are not reflected in the list control, although the values get correctly updated.
https://github.com/SharePoint/sp-dev-fx-extensions/tree/master/samples/react-field-toggle
https://github.com/SharePoint/sp-dev-fx-extensions/tree/master/samples/react-field-slider

Thanks for your contribution! Sharing is caring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:uservoice-requestEnhancements & feature requests should be posted: http://aka.ms/sp-dev-uservoice

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions