Skip to content

Commit c7fb163

Browse files
committed
remove first updatd on data-select
lint issues on cols
1 parent bfb218b commit c7fb163

File tree

4 files changed

+11
-19
lines changed

4 files changed

+11
-19
lines changed

docs/pages/components/cols.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ layout: component
2222

2323
```html:preview
2424
25-
<zn-cols layout="1,1" sticky>
25+
<zn-cols layout="1,1">
26+
2627
<div>
27-
<zn-panel style="position:sticky;">
28+
<zn-panel style="position: -webkit-sticky; position: sticky; top:10px;">
2829
<div class="box" style="height: 100px; margin: 10px 0; background: purple"></div>
2930
<div class="box" style="height: 100px;"></div>
3031
</zn-panel>
3132
</div>
32-
<div>
33+
3334
<zn-panel>
34-
<div class="box" style="height: 100px; margin: 10px 0; background: orange"></div>
35+
<div class="box" style="height: 100px; margin: 10px 0; background: orange"></div>
3536
<div class="box" style="height: 100px; background: orange"></div>
3637
<div class="box" style="height: 100px; background: orange"></div>
3738
<div class="box" style="height: 100px; background: orange"></div>
@@ -46,7 +47,7 @@ layout: component
4647
<div class="box" style="height: 100px; background: orange"></div>
4748
<div class="box" style="height: 100px; background: orange"></div>
4849
</zn-panel>
49-
</div>
50+
5051
</zn-cols>
5152
```
5253

docs/pages/components/data-select.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Icon position can be set to `start` or `end`. The default is `none`.
2323
```html:preview
2424
2525
<div class="form-spacing">
26-
<zn-data-select provider="country" name="country" icon-position="start"></zn-data-select>
26+
<zn-data-select provider="country" name="country" value="GB" icon-position="start"></zn-data-select>
2727
<zn-data-select provider="country" name="country" icon-position="end"></zn-data-select>
2828
</div>
2929
```

src/components/cols/cols.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ export default class ZnCols extends ZincElement {
2626
static styles: CSSResultGroup = unsafeCSS(styles);
2727

2828

29-
@property({reflect: true, attribute: "layout"}) layout: string = '';
29+
@property({reflect: true, attribute: 'layout'}) layout: string = '';
3030

3131
@property({attribute: 'mc', type: Number, reflect: true}) maxColumns: number = 0;
3232

33-
@property({attribute: "no-gap", type: Boolean}) noGap: boolean = false;
33+
@property({attribute: 'no-gap', type: Boolean}) noGap: boolean = false;
3434

3535
@property({type: Boolean}) border: boolean = false;
3636

37-
3837
render() {
3938
const layout: number[] = this.layout.split(/[\s,]+/).map((a) => parseInt(a)).filter((item) => !!item);
4039

src/components/data-select/data-select.component.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
emptyDataProvider,
77
type LocalDataProvider,
88
} from "./providers/provider";
9-
import {type CSSResultGroup, html, unsafeCSS, PropertyValues} from 'lit';
9+
import {type CSSResultGroup, html, unsafeCSS} from 'lit';
1010
import {FormControlController} from "../../internal/form";
1111
import {ifDefined} from "lit/directives/if-defined.js";
1212
import {LocalizeController} from '../../utilities/localize';
@@ -117,13 +117,6 @@ export default class ZnDataSelect extends ZincElement implements ZincFormControl
117117
return this.select.setCustomValidity(message);
118118
}
119119

120-
protected async firstUpdated(_changedProperties: PropertyValues) {
121-
super.firstUpdated(_changedProperties);
122-
await this.updateComplete;
123-
124-
if (this.prefix) this._updatePrefix(); // Update the prefix on first update
125-
}
126-
127120
@watch('value', {waitUntilFirstUpdate: true})
128121
async handleValueChange() {
129122
await this.updateComplete;
@@ -204,7 +197,6 @@ export default class ZnDataSelect extends ZincElement implements ZincFormControl
204197
slot="${this.iconPosition === 'end' ? 'suffix' : 'prefix'}">${item.prefix}</span>` : ''}
205198
${item.value}
206199
</zn-option>`)}
207-
</zn-select>
208-
`;
200+
</zn-select>`;
209201
}
210202
}

0 commit comments

Comments
 (0)