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

Schema problem for The "All" select filter item condition (Blog template) #176

Open
fredalai opened this issue May 9, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@fredalai
Copy link
Contributor

fredalai commented May 9, 2019

Describe the bug
The "All" select filter item condition problem

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'posts' page
  2. Add "20190508001" posts, the draft type is yes
  3. Add "20190508002" posts, the draft type is no
  4. Selects the filter is "Draft"
  5. Selects the filter is "All"
  6. See error (Cannot see all posts in the table list)

Expected behavior
The user can see all posts in the table list

Screenshots

  1. Show All posts

Correct_Show_all_posts

  1. Selects the filter is "Draft"

Show_draft_posts

  1. Selects the filter is "All"

Incorrect_Show_all_posts

Dependencies (please complete the following information):

  • OS: MacOS 10.14.4
  • Browser: Chrome 74.0.3729.131
  • Node Version: v10.15.3
  • Canner Version: 3.2.13

Additional context
It's the schema problem since no keyName called "condition".

<selectFilter
  alwaysDisplay
  label=""
  defaultOptionIndex={0}
  options={[
    {
      text: "All",
      condition: {
        condition: {}
      }
    },
    {
      text: "Published",
      condition: {
        draft: {
          eq: false
        }
      }
    },
    {
      text: "Draft",
      condition: {
        draft: {
          eq: true
        }
      }
    }
  ]}
/>
@fredalai fredalai added the bug Something isn't working label May 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant