Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: ion-list attribute "lines" not working when attribute "inset" is true #20819

Open
DwieDima opened this issue Mar 19, 2020 · 3 comments
Open

bug: ion-list attribute "lines" not working when attribute "inset" is true #20819

DwieDima opened this issue Mar 19, 2020 · 3 comments

Comments

@DwieDima
Copy link

@DwieDima DwieDima commented Mar 19, 2020

Bug Report

Ionic version:

[x] 5.0.5

Current behavior:

When you create an ion-list with ion-items and set the attribute inset="true" on ion-list, the attribute lines wont have any effect on ion-item. Instead you'll always see full lines.

Expected behavior:

attribute lines on ion-list should work when attribute inset="true" is set.

Steps to reproduce:

copy paste this snippet to any page:

 <ion-list inset="true" lines="full">
    <ion-item detail="true">
      <ion-label>test</ion-label>
    </ion-item>
    <ion-item detail="true">
      <ion-label>test</ion-label>
    </ion-item>
    <ion-item detail="true">
      <ion-label>test</ion-label>
    </ion-item>
    <ion-item detail="true">
      <ion-label>test</ion-label>
    </ion-item>
    <ion-item detail="true">
      <ion-label>test</ion-label>
    </ion-item>
    <ion-item detail="true">
      <ion-label>test</ion-label>
    </ion-item>
    <ion-item detail="true">
      <ion-label>test</ion-label>
    </ion-item>
  </ion-list>
  • change lines attribute to lines="none", lines="inset" --> no effect.
  • removing lines attribute will remain in lines="full".
    • Isn't the default behaviour lines="inset" ?

Other information:

Ionic info:

Ionic:

   Ionic CLI                     : 6.2.2 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.1.0-dev.202003171608.9d9a02f
   @angular-devkit/build-angular : 0.900.5
   @angular-devkit/schematics    : 9.0.5
   @angular/cli                  : 9.0.5
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 1.5.0
   @capacitor/core : 1.5.0

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : none
   Cordova Plugins   : no whitelisted plugins (1 plugins total)

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   ios-deploy : 1.10.0
   ios-sim    : 8.0.2
   NodeJS     : v12.16.0 (/usr/local/bin/node)
   npm        : 6.13.4
   OS         : macOS Catalina
   Xcode      : Xcode 11.3.1 Build version 11C504
@ionitron-bot ionitron-bot bot added the triage label Mar 19, 2020
@liamdebeasi
Copy link
Member

@liamdebeasi liamdebeasi commented Mar 19, 2020

Thanks for the issue. Can you provide a repo with the code required to reproduce this issue? I am unable to reproduce the issue using the code snippet provided.

CodePen of ion-list: https://codepen.io/liamdebeasi/pen/LYVBVZb

@ionitron-bot ionitron-bot bot removed the triage label Mar 19, 2020
@DwieDima
Copy link
Author

@DwieDima DwieDima commented Mar 21, 2020

@liamdebeasi i see your codepen is working.
I've just created a fresh project with "@ionic/angular": "^5.0.5" and was able to reproduce the bug.
Heres the repo.

--> when you serve the app, switch to iPad view using chrome browser:

  • inspect
  • toggle device toolbar
  • select iPad
  • refresh browser tab
@ionitron-bot ionitron-bot bot added triage and removed needs: reply labels Mar 21, 2020
@liamdebeasi
Copy link
Member

@liamdebeasi liamdebeasi commented Apr 1, 2020

Thanks for the follow up. I was able to reproduce the issue in my CodePen. It looks like this is related to #17425.

As a temporary workaround you can do the following to items in a list with lines="none" and "inset="true".

ion-list[inset=true][lines="none"] ion-item {
  --border-width: 0 !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.