Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Bug: calcite-pick-list filter is hiding all items #400

Closed
1 of 3 tasks
AdelheidF opened this issue Oct 17, 2019 · 16 comments
Closed
1 of 3 tasks

Bug: calcite-pick-list filter is hiding all items #400

AdelheidF opened this issue Oct 17, 2019 · 16 comments
Labels
4 - verified bug Something isn't working p - medium
Milestone

Comments

@AdelheidF
Copy link

AdelheidF commented Oct 17, 2019

Summary

Using "@esri/calcite-app-components@4.2.1"

(1)

  • When using the filter the list goes empty and doesn't come back when I remove the filter.

(2)

        <calcite-pick-list
          filter-enabled="true"
          multiple="true"
        >
          <calcite-dropdown slot="menu-actions" alignment="right">
            <calcite-action
              slot="dropdown-trigger"
              onclick=...
              label="Sort"
            >
              <svg>...</svg>
            </calcite-action>
            <calcite-dropdown-group grouptitle="Sort by">
              <calcite-dropdown-item active>Display name</calcite-dropdown-item>
              <calcite-dropdown-item>Type</calcite-dropdown-item>
            </calcite-dropdown-group>
          </calcite-dropdown>
          {items}
        </calcite-pick-list>

(3)

  • When in multiple=false mode I can deselect the single selected radio button by clicking on it again. I don't think it should let me do that. When in radio button mode there should be always one selected.

When using the "calciteListChange" event on a filtered list I assume I still get all checked items, correct? The filter doesn't affect the list of items. Can't test this currently.

Actual Behavior

Expected Behavior

Reproduction Steps

local version of https://devext.arcgis.com/apps/mapviewer/index.html

Relevant Info

@AdelheidF AdelheidF added the bug Something isn't working label Oct 17, 2019
@AdelheidF AdelheidF changed the title Bug: Bug: calcite-pick-list issues with filter Oct 17, 2019
@driskull driskull added this to the Donny milestone Oct 18, 2019
@AdelheidF AdelheidF changed the title Bug: calcite-pick-list issues with filter Bug: calcite-pick-list issues with filter + selection Oct 19, 2019
@AdelheidF AdelheidF changed the title Bug: calcite-pick-list issues with filter + selection Bug: calcite-pick-list issues with filter + css + selection Oct 19, 2019
@jbartley
Copy link

What is the latest on this issue? @pr3tori4n

@pr3tori4n
Copy link
Contributor

@jbartley I'm trying to find the root cause. I'm having trouble reproducing this in isolation. I just found out that Adelheide has a test-app setup in the app-components repo so I'm going to take a look at that. This is a priority for me.

@pr3tori4n
Copy link
Contributor

When using the "calciteListChange" event on a filtered list I assume I still get all checked items, correct? The filter doesn't affect the list of items. Can't test this currently.

@AdelheidF That's correct. The filter only changes what's displayed, it doesn't affect the current selections.

@pr3tori4n
Copy link
Contributor

When in multiple=false mode I can deselect the single selected radio button by clicking on it again. I don't think it should let me do that. When in radio button mode there should be always one selected.

@kat10140 @asangma Can you triage this and create an enhancement issue. Do we need a flag for this behavior (there a use case for the way we have it now?) or can we just modify the default?

@pr3tori4n
Copy link
Contributor

@AdelheidF @jbartley @jcfranco this is being caused by the same Maquette.js issue we saw when the pre-selection wasn't working. I hesitate to move more setup code to run after first-render. I'd like to dig into Maquette a bit and see why this is happening - why some attributes are populated on first render, but others aren't. This could happen with other components as well so I'd like to do more research. If there's a way of preventing this behavior in using Maquette that'd be the ideal solution imo. If not, we might find a better solution with some more advanced mutationObservers.

@AdelheidF if you need a workaround soon - I can offer you something temporary in the meantime. Let me know.

@AdelheidF
Copy link
Author

if you need a workaround soon - I can offer you something temporary in the meantime. Let me know.

Since it's already on devext and pretty obvious a temporary solution would be great. Thanks!

@jcfranco
Copy link
Member

why some attributes are populated on first render, but others aren't.

I doubt this is being caused by maquette. Could it be some NonReact™ component oddness?

@pr3tori4n
Copy link
Contributor

@AdelheidF @jbartley I have a temporary fix in until I find out the true root cause.

@pr3tori4n pr3tori4n changed the title Bug: calcite-pick-list issues with filter + css + selection Bug: calcite-pick-list filter is hiding all items Oct 24, 2019
@pr3tori4n
Copy link
Contributor

@kat10140 can you help triage this item and move #3 into a separate issue?

@kat10140
Copy link
Contributor

kat10140 commented Oct 29, 2019

@pr3tori4n that issue is closed? derp 😄

@AdelheidF
Copy link
Author

1 and 2 are fixed, 3 I can handle myself if it's not considered a bug. Thanks.

@pr3tori4n
Copy link
Contributor

@kat10140 sorry link was unintentional :) - didn't mean issue 3 but the 3rd item in Adelheides initial comment (3).

pr3tori4n added a commit that referenced this issue Nov 6, 2019
…st-render (#400)

* add a console warn and simpler demo file

* 3 new tests for filter. metadata wip

* change filter data from to selected properties.
Prior was using all attributes.

* add event for modified properties filter depends on

* split filter setup so it can called on prop change

* fix bug in tests

* remove .only from test

* filter: add a warning when there is no data.

* fix getTag to work with no attributes

* add tests for filter

* fix accessibility

* change existing demo to advanced demo

* change simple demo to default

* wip demos

* PickList and ValueList: share more code between lists 461 (#484)

* remove .only from test

* fix lint errors

* add temporary backup files to gitignore

* abstract common methods to a shared location

* share selection/deselection tests

* fix shiftClick behavior for valueList

* abstract shared tests between lists

* improve method return type

* normalize render functions

* add this typing to shared logic file
https://stackoverflow.com/questions/54710927/typescript-types-and-bind

* moving compact prop to alpha order

* added typing to items

* add compact property to value list

* fix type error on textHeading

* fix typings

* update lists to use common MO callback
MO: Mutation Observer

* comment touchup

* fix backwards compat and event typing

* add missing typings

* space the tests out

* code review follow up

* abstracted some types

* move comment up

* PickList and ValueList: share render methods between lists 461 (#488)

* fix lint errors

* add temporary backup files to gitignore

* abstract common methods to a shared location

* share selection/deselection tests

* fix shiftClick behavior for valueList

* abstract shared tests between lists

* improve method return type

* normalize render functions

* abstract the render methods to functional comp

* switch value list over to use shared render

* fix calcite-block accessible test.

* update calciteListItemPropsUpdated event docs

* replace attribute logic with properties

* minor demo changes

* clean up demo

* removing redundant warn message

* remove maquette
@pr3tori4n pr3tori4n removed their assignment Nov 8, 2019
@pr3tori4n
Copy link
Contributor

@kat10140 Please verify.

@kat10140
Copy link
Contributor

kat10140 commented Nov 8, 2019

@pr3tori4n looks like radio buttons can still be deselected

@kat10140
Copy link
Contributor

kat10140 commented Nov 8, 2019

radio buttons

@kat10140 kat10140 assigned pr3tori4n and unassigned kat10140 Nov 8, 2019
@kat10140
Copy link
Contributor

kat10140 commented Nov 8, 2019

nvm, making this into separate issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4 - verified bug Something isn't working p - medium
Projects
None yet
Development

No branches or pull requests

6 participants