kopia lustrzana https://github.com/shoelace-style/shoelace
fix tooltip formatter in react@ext
rodzic
7d818c0590
commit
302f3b57c5
|
@ -6,6 +6,10 @@ Components with the <sl-badge type="warning" pill>Experimental</sl-badge> badge
|
|||
|
||||
_During the beta period, these restrictions may be relaxed in the event of a mission-critical bug._ 🐛
|
||||
|
||||
## Next
|
||||
|
||||
- Fixed bug where setting `tooltipFormatter` on `<sl-range>` in JSX causes React@experimental to error out
|
||||
|
||||
## 2.0.0-beta.62
|
||||
|
||||
- 🚨 BREAKING: changed the `locale` attribute to `lang` in `<sl-format-bytes>`, `<sl-format-date>`, `<sl-format-number>`, and `<sl-relative-time>` to be consistent with how localization is handled
|
||||
|
|
|
@ -260,7 +260,11 @@ export default class SlRange extends LitElement {
|
|||
@blur=${this.handleBlur}
|
||||
/>
|
||||
${this.tooltip !== 'none' && !this.disabled
|
||||
? html` <output part="tooltip" class="range__tooltip"> ${this.tooltipFormatter(this.value)} </output> `
|
||||
? html`
|
||||
<output part="tooltip" class="range__tooltip">
|
||||
${typeof this.tooltipFormatter === 'function' ? this.tooltipFormatter(this.value) : this.value}
|
||||
</output>
|
||||
`
|
||||
: ''}
|
||||
</div>
|
||||
`
|
||||
|
|
Ładowanie…
Reference in New Issue