fix(picker): do not change datetime/picker column order in RTL (#17018)

Closes #16294
This commit is contained in:
Adam Bradley
2019-01-09 12:06:13 -06:00
committed by GitHub
parent b4f34054ef
commit 1338d71dff
4 changed files with 19 additions and 7 deletions

View File

@ -239,6 +239,7 @@ rules:
- contain - contain
- content - content
- cursor - cursor
- direction
- empty-cells - empty-cells
- object-fit - object-fit
- opacity - opacity
@ -254,7 +255,6 @@ rules:
property-blacklist: property-blacklist:
- background-position - background-position
- direction
- right - right
- left - left
- float - float

View File

@ -18,3 +18,19 @@ test('datetime: basic', async () => {
compare = await page.compareScreenshot('should open custom picker'); compare = await page.compareScreenshot('should open custom picker');
expect(compare).toMatchScreenshot(); expect(compare).toMatchScreenshot();
}); });
test('datetime: basic-rtl', async () => {
const page = await newE2EPage({
url: '/src/components/datetime/test/basic?ionic:_testing=true&rtl=true'
});
const datetime = await page.find('#customPickerOptions');
await datetime.click();
const picker = await page.find('ion-picker');
await picker.waitForVisible();
await page.waitFor(250);
const compare = await page.compareScreenshot('should open custom picker');
expect(compare).toMatchScreenshot();
});

View File

@ -101,7 +101,7 @@
<ion-item> <ion-item>
<ion-label>h:mm a</ion-label> <ion-label>h:mm a</ion-label>
<ion-datetime display-format="h:mm a"></ion-datetime> <ion-datetime display-format="h:mm a" value="01:47"></ion-datetime>
</ion-item> </ion-item>
<ion-item> <ion-item>

View File

@ -108,11 +108,6 @@
// -------------------------------------------------- // --------------------------------------------------
.picker-columns { .picker-columns {
@include rtl() {
// Date is the same format in both directions
flex-direction: row-reverse;
}
display: flex; display: flex;
position: relative; position: relative;
@ -121,6 +116,7 @@
margin-bottom: var(--ion-safe-area-bottom, 0); margin-bottom: var(--ion-safe-area-bottom, 0);
contain: strict; contain: strict;
direction: ltr;
overflow: hidden; overflow: hidden;
} }