use-selected-items-hook icon indicating copy to clipboard operation
use-selected-items-hook copied to clipboard

List of items is not reset when empty array is passed in

Open tlindener opened this issue 2 years ago • 1 comments

Steps to reproduce the issue

  1. Set initialItems to array with 10 items
  2. update initialItems with an empty array

What I expected

The "items" value to update to an empty array

What happened instead

The "items" value was the same from step 1

tlindener avatar Sep 01 '21 12:09 tlindener

Hey @tlindener, thanks for reporting this issue!

I'm mostly sure it's related to a truthy check on the items value when updating it - I'll double-check that and open a PR with the fix.

LauraBeatris avatar Sep 08 '21 17:09 LauraBeatris