sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

customRowActions stop working when item is refreshed

Open thechriskent opened this issue 8 years ago • 20 comments

Category

  • [ ] Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

In list formatting, you can specify a customRowAction with an action value. These buttons should work even after a list item refreshes.

Observed Behavior

Clicking on a button with an action set to editProps will open the edit item property pane as expected. However, if you make any updates and apply them the item will refresh with your formatting, but the action button will no longer work. Other item's action buttons continue to work, but the refreshed item's button does not until you refresh the page:

Action Failure

Steps to Reproduce

Create a view or column format with a button element and set the customRowAction action property to editProps. Click the button and see the property panel open. Make an update. See that you can't click the button again until you refresh.

thechriskent avatar Aug 22 '18 04:08 thechriskent

I have this same issue.

ggunk avatar Aug 24 '18 19:08 ggunk

Thanks for reporting this. We just attempted to repro this in our internal environment, and couldn't. It's possible this was a temporary issue and might have gotten fixed inadvertently through some other change that was made. We will keep an eye on this.

ldemaris avatar Aug 24 '18 23:08 ldemaris

@ldemaris I am still seeing this issue in my tenant.

thechriskent avatar Oct 18 '18 16:10 thechriskent

@ldemaris @VesaJuvonen Unfortunately, this is still an issue. Is there any update on this? Please work on this for a better usability on modern lists.

Thank you!

lucs17 avatar Feb 22 '19 17:02 lucs17

@thechriskent How did you apply those icons to the button element?

navarrorc avatar Apr 08 '19 22:04 navarrorc

This is still happening in our tenant. Is there a fix that's found out?

deepuvijayannair avatar Apr 15 '19 01:04 deepuvijayannair

Happening on 3 of our clients tennants too. I would love to hear about a workaround.

winterscar avatar May 01 '19 12:05 winterscar

same issue too!

Nerih avatar May 06 '19 00:05 Nerih

Same issue and would say it's not isolated to the editProps action, but in fact related to all customRowActions. For instance, if a button that launches a flow has a visibility that is conditional on a column value, if you edit an item to make whatever that condition is 'true' (and thus displaying the button that launches a flow), the button won't work until the page is refreshes or reloaded.

I suppose a fix would be for a refresh to be called every time an item is edited and the edit properties panel is saved, the problem is that there is no 'Save' or 'OK' to hook in to.

It's a bit of a guess, but what might be happening here is that because properties are saved whilst actually in the edit properties panel is open (the little 'Saving...' > 'Saved' text and tick pops up), there is no 'OK' or 'Save' button and therefore no action to trigger a page refresh - you just effectively close or cancel the edit properties panel. Maybe a simple fix would be to apply a page refresh when edit properties panel is closed no matter how you close it, or detect a change to the properties and arm the trigger when the edit properties panel is closed.

JoeAyre avatar Jun 03 '19 05:06 JoeAyre

Any update on this bug? Be great to get it fixed soon.

JoeAyre avatar Jun 28 '19 06:06 JoeAyre

@PopWarner @thechriskent @VesaJuvonen @ldemaris I was facing this issue already 1 year ago and I'm surprised it hasn't been fixed yet. Today I was going a little bit hunting and realized when it occurs, for everyone who'd need to reproduce the issue:

  1. create a new list
  2. create a column "status"
  3. create 1 item with the status set to "in progress" (it doesn't matter what you type in here as long as it aligns with the view formatting below)
  4. format the view and paste the following code { "schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "debugMode": false, "hideSelection": true, "hideColumnHeader": true, "rowFormatter": { "elmType": "div", "attributes": { "class": "ms-borderColor-neutralLight" }, "style": { "flex-direction": "column", "align-items": "stretch", "box-sizing": "border-box", "border-width": "1px", "border-left-width": "4px", "border-style": "solid", "border-left-color": "=if([$status] == 'in progress', '#e1dc0f', if([$status] == 'active', '#50dc21', '#ff3300')", "margin-bottom": "10px" }, "children": [ { "elmType": "button", "customRowAction": { "action": "editProps" }, "txtContent": "edit Props" } ] } }
  5. edit any item and you'll see that it all works fine UNTIL you add either "in progress" or "active" in the status field. Again, it doesn't matter what you enter in status, as long as it aligns with the formatting if conditions values

The behavior is the following: When the default value is "in progress" or "active" you'll only be able to open it once before you need to refresh the page. When the default value is something else than those two values, then you can edit it as many times as you like UNTIL you change it back to "in progress" or "active".

I hope this helps to speed things up for a solution.

FabianAckeret avatar Jul 30 '19 06:07 FabianAckeret

Thanks @isabasu - I'm surprised it isn't fixed too. For me the fix is the difference between a fully working 'product' (a dashboard where users can launch Flows, and view fresh data without having to refresh the page!) and a product that comes with advice that users should refresh the page if they find buttons to be inactive. The latter is not viable to offer to users, therefore roll out of any 'product' is parked until this is fixed. @andrewconnell - as this bug has now been confirmed, is there a way to see what work is being done on it? Thanks.

JoeAyre avatar Aug 12 '19 03:08 JoeAyre

@JoeAyre I'm not sure why I moved it from suspected>confirmed... I don't have much exp with list/column formatting or insight into the issue. Fixing the labels...

@JoeAyre said:

is there a way to see what work is being done on it

Only if someone from Microsoft chimes in on the thread...

andrewconnell avatar Aug 12 '19 10:08 andrewconnell

I seem to be seeing this issue only with the editProps action, if I use the defaultClick action the item opens. Is this therefore the same issue as described here?

This is causing issues for users accessing SharePoint with the new models of IPhone. I have an older IPhone 6S and the editProps seems to work on that(!) - is anyone aware of any progress on this?

AndyBolam avatar Nov 14 '19 10:11 AndyBolam

Thanks everyone for your inputs. The scenario works on column formatting but is broken on View formatting. We will work on this and roll out a fix soon. Thanks!

shre-verse avatar Jan 27 '20 20:01 shre-verse

The issue has been fixed locally and would be rolled out in the upcoming updates.

shre-verse avatar Feb 04 '20 01:02 shre-verse

The build with fix is now in prod. Please check if this is fixed for you.

@thechriskent @ggunk @lucs17 @deepuvijayannair @JoeAyre @isabasu @winterscar @Nerih

shre-verse avatar Feb 27 '20 05:02 shre-verse

I can confirm that this is fixed. Thanks a lot :)

deepuvijayannair avatar Feb 27 '20 06:02 deepuvijayannair

@shagra-ms @andrewconnell I am facing similar problem, the button element seems not render properly during page load and no response when click on the item. It fire up after i click preview. I have double check using Chrome and Mozilla in private mode, both remain the same. https://github.com/SharePoint/sp-dev-list-formatting/issues/220

wfplim avatar Feb 28 '20 07:02 wfplim

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Mar 06 '20 12:03 msft-github-bot