@douyinfe/semi-ui 2.10.2-alpha.0 → 2.10.2-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umd/semi-ui.js +22 -0
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/table/Body/BaseRow.d.ts +1 -0
- package/lib/cjs/table/Body/BaseRow.js +22 -0
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/table/Body/BaseRow.d.ts +1 -0
- package/lib/es/table/Body/BaseRow.js +22 -0
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +2 -2
- package/table/Body/BaseRow.tsx +15 -0
package/dist/umd/semi-ui.js
CHANGED
|
@@ -88234,6 +88234,28 @@ class BaseRow_TableRow extends baseComponent_BaseComponent {
|
|
|
88234
88234
|
});
|
|
88235
88235
|
}
|
|
88236
88236
|
|
|
88237
|
+
componentDidMount() {
|
|
88238
|
+
// fix #745
|
|
88239
|
+
// didmount/willUnmount may be called twice when React.StrictMode is true in React 18, we need to ensure that this.cache.customRowProps is correct
|
|
88240
|
+
const {
|
|
88241
|
+
onRow,
|
|
88242
|
+
index,
|
|
88243
|
+
record
|
|
88244
|
+
} = this.props;
|
|
88245
|
+
const customRowProps = this.adapter.getCache('customRowProps');
|
|
88246
|
+
|
|
88247
|
+
if (typeof customRowProps === 'undefined') {
|
|
88248
|
+
const _a = onRow(record, index) || {},
|
|
88249
|
+
{
|
|
88250
|
+
className: customClassName,
|
|
88251
|
+
style: customStyle
|
|
88252
|
+
} = _a,
|
|
88253
|
+
rowProps = BaseRow_rest(_a, ["className", "style"]);
|
|
88254
|
+
|
|
88255
|
+
this.adapter.setCache('customRowProps', assign_default()({}, rowProps));
|
|
88256
|
+
}
|
|
88257
|
+
}
|
|
88258
|
+
|
|
88237
88259
|
shouldComponentUpdate(nextProps) {
|
|
88238
88260
|
/**
|
|
88239
88261
|
* Shallow comparison of incoming props to simulate PureComponent
|