drodil / backstage-plugin-qeta

Backstage.io plugin for Q&A
https://www.npmjs.com/package/@drodil/backstage-plugin-qeta
MIT License
81 stars 25 forks source link

bug: Entity filter is hiding after selecting entity from list #154

Closed kedaroh-bh closed 4 months ago

kedaroh-bh commented 4 months ago

Issue

Entity filter is hiding after selecting entity from list

Pre-requisite

Entities should be configured in local_dev.yaml and there should be a questions linked to some of the entities.

Steps to Reproduce

  1. Go to root page
  2. Open filters panel
  3. Select entity from entity dropdown
  4. Entity dropdown disappears.

Root Cause

There is showEntityFilter prop passed to FilterPanel component and its value is set based on there is entity query params is present, which looks unnecessary, Entity filter should only depends on if there are entities available and on top of it if user purposefully want it to be hidden irrespectively available entities by manually passing showEntityFilter as false.

Screenshots

Without selecting entity filter hence no query param: image

With entity filter selected hence there is a entity query param: image

Duplicate entity refs in entity filter dropdown after selection: qeta_fix_issue_#154_showing_selected_entity_twice