@bryntum/core-react-thin 7.3.1 → 7.3.3
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/lib/BryntumBooleanCombo.d.ts +1 -1
- package/lib/BryntumBooleanCombo.js +1 -1
- package/lib/BryntumBooleanCombo.js.map +1 -1
- package/lib/BryntumButton.d.ts +1 -1
- package/lib/BryntumButton.js +1 -1
- package/lib/BryntumButton.js.map +1 -1
- package/lib/BryntumButtonGroup.d.ts +1 -1
- package/lib/BryntumButtonGroup.js +1 -1
- package/lib/BryntumButtonGroup.js.map +1 -1
- package/lib/BryntumChatPanel.d.ts +1 -1
- package/lib/BryntumChatPanel.js +1 -1
- package/lib/BryntumChatPanel.js.map +1 -1
- package/lib/BryntumCheckbox.d.ts +1 -1
- package/lib/BryntumCheckbox.js +1 -1
- package/lib/BryntumCheckbox.js.map +1 -1
- package/lib/BryntumCheckboxGroup.d.ts +1 -1
- package/lib/BryntumCheckboxGroup.js +1 -1
- package/lib/BryntumCheckboxGroup.js.map +1 -1
- package/lib/BryntumChipView.d.ts +2 -2
- package/lib/BryntumChipView.js +1 -1
- package/lib/BryntumChipView.js.map +1 -1
- package/lib/BryntumCodeEditor.d.ts +1 -1
- package/lib/BryntumCodeEditor.js +1 -1
- package/lib/BryntumCodeEditor.js.map +1 -1
- package/lib/BryntumColorField.d.ts +1 -1
- package/lib/BryntumColorField.js +1 -1
- package/lib/BryntumColorField.js.map +1 -1
- package/lib/BryntumCombo.d.ts +1 -1
- package/lib/BryntumCombo.js +1 -1
- package/lib/BryntumCombo.js.map +1 -1
- package/lib/BryntumContainer.d.ts +1 -1
- package/lib/BryntumContainer.js +1 -1
- package/lib/BryntumContainer.js.map +1 -1
- package/lib/BryntumDateField.d.ts +1 -1
- package/lib/BryntumDateField.js +1 -1
- package/lib/BryntumDateField.js.map +1 -1
- package/lib/BryntumDatePicker.d.ts +1 -1
- package/lib/BryntumDatePicker.js +1 -1
- package/lib/BryntumDatePicker.js.map +1 -1
- package/lib/BryntumDateRangeField.d.ts +1 -1
- package/lib/BryntumDateRangeField.js +1 -1
- package/lib/BryntumDateRangeField.js.map +1 -1
- package/lib/BryntumDateTimeField.d.ts +1 -1
- package/lib/BryntumDateTimeField.js +1 -1
- package/lib/BryntumDateTimeField.js.map +1 -1
- package/lib/BryntumDemoCodeEditor.d.ts +1 -1
- package/lib/BryntumDemoCodeEditor.js +1 -1
- package/lib/BryntumDemoCodeEditor.js.map +1 -1
- package/lib/BryntumDisplayField.d.ts +1 -1
- package/lib/BryntumDisplayField.js +1 -1
- package/lib/BryntumDisplayField.js.map +1 -1
- package/lib/BryntumDurationField.d.ts +1 -1
- package/lib/BryntumDurationField.js +1 -1
- package/lib/BryntumDurationField.js.map +1 -1
- package/lib/BryntumEditor.d.ts +1 -1
- package/lib/BryntumEditor.js +1 -1
- package/lib/BryntumEditor.js.map +1 -1
- package/lib/BryntumFieldFilterPicker.d.ts +1 -1
- package/lib/BryntumFieldFilterPicker.js +1 -1
- package/lib/BryntumFieldFilterPicker.js.map +1 -1
- package/lib/BryntumFieldFilterPickerGroup.d.ts +1 -1
- package/lib/BryntumFieldFilterPickerGroup.js +1 -1
- package/lib/BryntumFieldFilterPickerGroup.js.map +1 -1
- package/lib/BryntumFieldSet.d.ts +1 -1
- package/lib/BryntumFieldSet.js +1 -1
- package/lib/BryntumFieldSet.js.map +1 -1
- package/lib/BryntumFileField.d.ts +1 -1
- package/lib/BryntumFileField.js +1 -1
- package/lib/BryntumFileField.js.map +1 -1
- package/lib/BryntumFilePicker.d.ts +1 -1
- package/lib/BryntumFilePicker.js +1 -1
- package/lib/BryntumFilePicker.js.map +1 -1
- package/lib/BryntumFilterField.d.ts +1 -1
- package/lib/BryntumFilterField.js +1 -1
- package/lib/BryntumFilterField.js.map +1 -1
- package/lib/BryntumHint.js +1 -0
- package/lib/BryntumHint.js.map +1 -1
- package/lib/BryntumLabel.d.ts +1 -1
- package/lib/BryntumLabel.js +1 -1
- package/lib/BryntumLabel.js.map +1 -1
- package/lib/BryntumList.d.ts +1 -1
- package/lib/BryntumList.js +1 -1
- package/lib/BryntumList.js.map +1 -1
- package/lib/BryntumMenu.d.ts +1 -1
- package/lib/BryntumMenu.js +1 -1
- package/lib/BryntumMenu.js.map +1 -1
- package/lib/BryntumMonthPicker.d.ts +1 -1
- package/lib/BryntumMonthPicker.js +1 -1
- package/lib/BryntumMonthPicker.js.map +1 -1
- package/lib/BryntumNumberField.d.ts +1 -1
- package/lib/BryntumNumberField.js +1 -1
- package/lib/BryntumNumberField.js.map +1 -1
- package/lib/BryntumPagingToolbar.d.ts +1 -1
- package/lib/BryntumPagingToolbar.js +1 -1
- package/lib/BryntumPagingToolbar.js.map +1 -1
- package/lib/BryntumPanel.d.ts +1 -1
- package/lib/BryntumPanel.js +1 -1
- package/lib/BryntumPanel.js.map +1 -1
- package/lib/BryntumPasswordField.d.ts +1 -1
- package/lib/BryntumPasswordField.js +1 -1
- package/lib/BryntumPasswordField.js.map +1 -1
- package/lib/BryntumProgressBar.d.ts +1 -1
- package/lib/BryntumProgressBar.js +1 -1
- package/lib/BryntumProgressBar.js.map +1 -1
- package/lib/BryntumRadio.d.ts +1 -1
- package/lib/BryntumRadio.js +1 -1
- package/lib/BryntumRadio.js.map +1 -1
- package/lib/BryntumRadioGroup.d.ts +1 -1
- package/lib/BryntumRadioGroup.js +1 -1
- package/lib/BryntumRadioGroup.js.map +1 -1
- package/lib/BryntumSlideToggle.d.ts +1 -1
- package/lib/BryntumSlideToggle.js +1 -1
- package/lib/BryntumSlideToggle.js.map +1 -1
- package/lib/BryntumSlider.d.ts +1 -1
- package/lib/BryntumSlider.js +1 -1
- package/lib/BryntumSlider.js.map +1 -1
- package/lib/BryntumSplitter.d.ts +1 -1
- package/lib/BryntumSplitter.js +1 -1
- package/lib/BryntumSplitter.js.map +1 -1
- package/lib/BryntumTabPanel.d.ts +1 -1
- package/lib/BryntumTabPanel.js +1 -1
- package/lib/BryntumTabPanel.js.map +1 -1
- package/lib/BryntumTextAreaField.d.ts +1 -1
- package/lib/BryntumTextAreaField.js +1 -1
- package/lib/BryntumTextAreaField.js.map +1 -1
- package/lib/BryntumTextAreaPickerField.d.ts +1 -1
- package/lib/BryntumTextAreaPickerField.js +1 -1
- package/lib/BryntumTextAreaPickerField.js.map +1 -1
- package/lib/BryntumTextField.d.ts +1 -1
- package/lib/BryntumTextField.js +1 -1
- package/lib/BryntumTextField.js.map +1 -1
- package/lib/BryntumTimeField.d.ts +1 -1
- package/lib/BryntumTimeField.js +1 -1
- package/lib/BryntumTimeField.js.map +1 -1
- package/lib/BryntumTimePicker.d.ts +1 -1
- package/lib/BryntumTimePicker.js +1 -1
- package/lib/BryntumTimePicker.js.map +1 -1
- package/lib/BryntumToolbar.d.ts +1 -1
- package/lib/BryntumToolbar.js +1 -1
- package/lib/BryntumToolbar.js.map +1 -1
- package/lib/BryntumWidget.d.ts +1 -1
- package/lib/BryntumWidget.js +1 -1
- package/lib/BryntumWidget.js.map +1 -1
- package/lib/BryntumYearPicker.d.ts +1 -1
- package/lib/BryntumYearPicker.js +1 -1
- package/lib/BryntumYearPicker.js.map +1 -1
- package/lib/WrapperHelper.js +27 -8
- package/lib/WrapperHelper.js.map +1 -1
- package/license.pdf +0 -0
- package/package.json +1 -1
- package/src/BryntumBooleanCombo.tsx +12 -5
- package/src/BryntumButton.tsx +12 -5
- package/src/BryntumButtonGroup.tsx +13 -6
- package/src/BryntumChatPanel.tsx +13 -6
- package/src/BryntumCheckbox.tsx +12 -5
- package/src/BryntumCheckboxGroup.tsx +13 -6
- package/src/BryntumChipView.tsx +15 -6
- package/src/BryntumCodeEditor.tsx +13 -6
- package/src/BryntumColorField.tsx +12 -5
- package/src/BryntumCombo.tsx +12 -5
- package/src/BryntumContainer.tsx +13 -6
- package/src/BryntumDateField.tsx +12 -5
- package/src/BryntumDatePicker.tsx +13 -6
- package/src/BryntumDateRangeField.tsx +12 -5
- package/src/BryntumDateTimeField.tsx +12 -5
- package/src/BryntumDemoCodeEditor.tsx +13 -6
- package/src/BryntumDisplayField.tsx +12 -5
- package/src/BryntumDurationField.tsx +12 -5
- package/src/BryntumEditor.tsx +13 -6
- package/src/BryntumFieldFilterPicker.tsx +13 -6
- package/src/BryntumFieldFilterPickerGroup.tsx +13 -6
- package/src/BryntumFieldSet.tsx +13 -6
- package/src/BryntumFileField.tsx +12 -5
- package/src/BryntumFilePicker.tsx +13 -6
- package/src/BryntumFilterField.tsx +12 -5
- package/src/BryntumHint.tsx +9 -2
- package/src/BryntumLabel.tsx +12 -5
- package/src/BryntumList.tsx +12 -5
- package/src/BryntumMenu.tsx +12 -5
- package/src/BryntumMonthPicker.tsx +13 -6
- package/src/BryntumNumberField.tsx +12 -5
- package/src/BryntumPagingToolbar.tsx +13 -6
- package/src/BryntumPanel.tsx +13 -6
- package/src/BryntumPasswordField.tsx +12 -5
- package/src/BryntumProgressBar.tsx +12 -5
- package/src/BryntumRadio.tsx +12 -5
- package/src/BryntumRadioGroup.tsx +13 -6
- package/src/BryntumSlideToggle.tsx +12 -5
- package/src/BryntumSlider.tsx +12 -5
- package/src/BryntumSplitter.tsx +12 -5
- package/src/BryntumTabPanel.tsx +13 -6
- package/src/BryntumTextAreaField.tsx +12 -5
- package/src/BryntumTextAreaPickerField.tsx +12 -5
- package/src/BryntumTextField.tsx +12 -5
- package/src/BryntumTimeField.tsx +12 -5
- package/src/BryntumTimePicker.tsx +13 -6
- package/src/BryntumToolbar.tsx +13 -6
- package/src/BryntumWidget.tsx +12 -5
- package/src/BryntumYearPicker.tsx +13 -6
- package/src/WrapperHelper.tsx +55 -17
package/src/BryntumTextField.tsx
CHANGED
|
@@ -34,6 +34,8 @@ export type BryntumTextFieldProps = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
|
|
36
36
|
* runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/core/docs/api/Core/widget/Widget#property-element).
|
|
37
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
38
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TextField#config-appendTo)
|
|
37
39
|
*/
|
|
38
40
|
appendTo? : HTMLElement|string
|
|
39
41
|
/**
|
|
@@ -80,9 +82,10 @@ export type BryntumTextFieldProps = {
|
|
|
80
82
|
catchEventHandlerExceptions? : boolean
|
|
81
83
|
/**
|
|
82
84
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
83
|
-
*
|
|
85
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TextField#config-centered)
|
|
86
|
+
* @property {boolean} [once] If `true`, the Widget will be centred on its first show, but if it is moved at runtime, it will opt out of centering for future shows.
|
|
84
87
|
*/
|
|
85
|
-
centered? : boolean
|
|
88
|
+
centered? : boolean|object
|
|
86
89
|
/**
|
|
87
90
|
* A function (or the name of a function in the ownership hierarchy) called during field validation
|
|
88
91
|
* to perform custom validity checks. The function is called as part of the [isValid](https://bryntum.com/products/core/docs/api/Core/widget/Field#property-isValid)
|
|
@@ -179,7 +182,7 @@ export type BryntumTextFieldProps = {
|
|
|
179
182
|
dock? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
|
|
180
183
|
/**
|
|
181
184
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
182
|
-
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a
|
|
185
|
+
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a `handleSelector`
|
|
183
186
|
* property which controls when a drag should start.
|
|
184
187
|
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TextField#config-draggable)
|
|
185
188
|
* @property {string} handleSelector CSS selector used to determine if drag can be started from a mouse-downed element inside the widget
|
|
@@ -295,10 +298,14 @@ export type BryntumTextFieldProps = {
|
|
|
295
298
|
inputWidth? : string|number
|
|
296
299
|
/**
|
|
297
300
|
* Element (or element id) to insert this widget before. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
301
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
302
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TextField#config-insertBefore)
|
|
298
303
|
*/
|
|
299
304
|
insertBefore? : HTMLElement|string
|
|
300
305
|
/**
|
|
301
306
|
* Element (or element id) to append this widget element to, as a first child. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
307
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
308
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TextField#config-insertFirst)
|
|
302
309
|
*/
|
|
303
310
|
insertFirst? : HTMLElement|string
|
|
304
311
|
/**
|
|
@@ -496,7 +503,7 @@ export type BryntumTextFieldProps = {
|
|
|
496
503
|
rtl? : boolean
|
|
497
504
|
/**
|
|
498
505
|
* Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
|
|
499
|
-
* Valid values:
|
|
506
|
+
* Valid values: `null`: do nothing, `hide`: hide the widget or `realign`: realign to the target if possible.
|
|
500
507
|
*/
|
|
501
508
|
scrollAction? : 'hide'|'realign'|null
|
|
502
509
|
/**
|
|
@@ -773,7 +780,6 @@ export class BryntumTextField extends React.Component<BryntumTextFieldProps> {
|
|
|
773
780
|
'autoComplete',
|
|
774
781
|
'autoSelect',
|
|
775
782
|
'bubbleEvents',
|
|
776
|
-
'centered',
|
|
777
783
|
'checkValidity',
|
|
778
784
|
'clearable',
|
|
779
785
|
'color',
|
|
@@ -843,6 +849,7 @@ export class BryntumTextField extends React.Component<BryntumTextFieldProps> {
|
|
|
843
849
|
'badge',
|
|
844
850
|
'callOnFunctions',
|
|
845
851
|
'catchEventHandlerExceptions',
|
|
852
|
+
'centered',
|
|
846
853
|
'cls',
|
|
847
854
|
'column',
|
|
848
855
|
'dataset',
|
package/src/BryntumTimeField.tsx
CHANGED
|
@@ -34,6 +34,8 @@ export type BryntumTimeFieldProps = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
|
|
36
36
|
* runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/core/docs/api/Core/widget/Widget#property-element).
|
|
37
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
38
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimeField#config-appendTo)
|
|
37
39
|
*/
|
|
38
40
|
appendTo? : HTMLElement|string
|
|
39
41
|
/**
|
|
@@ -84,9 +86,10 @@ export type BryntumTimeFieldProps = {
|
|
|
84
86
|
catchEventHandlerExceptions? : boolean
|
|
85
87
|
/**
|
|
86
88
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
87
|
-
*
|
|
89
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimeField#config-centered)
|
|
90
|
+
* @property {boolean} [once] If `true`, the Widget will be centred on its first show, but if it is moved at runtime, it will opt out of centering for future shows.
|
|
88
91
|
*/
|
|
89
|
-
centered? : boolean
|
|
92
|
+
centered? : boolean|object
|
|
90
93
|
/**
|
|
91
94
|
* A function (or the name of a function in the ownership hierarchy) called during field validation
|
|
92
95
|
* to perform custom validity checks. The function is called as part of the [isValid](https://bryntum.com/products/core/docs/api/Core/widget/Field#property-isValid)
|
|
@@ -183,7 +186,7 @@ export type BryntumTimeFieldProps = {
|
|
|
183
186
|
dock? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
|
|
184
187
|
/**
|
|
185
188
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
186
|
-
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a
|
|
189
|
+
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a `handleSelector`
|
|
187
190
|
* property which controls when a drag should start.
|
|
188
191
|
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimeField#config-draggable)
|
|
189
192
|
* @property {string} handleSelector CSS selector used to determine if drag can be started from a mouse-downed element inside the widget
|
|
@@ -301,10 +304,14 @@ export type BryntumTimeFieldProps = {
|
|
|
301
304
|
inputWidth? : string|number
|
|
302
305
|
/**
|
|
303
306
|
* Element (or element id) to insert this widget before. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
307
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
308
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimeField#config-insertBefore)
|
|
304
309
|
*/
|
|
305
310
|
insertBefore? : HTMLElement|string
|
|
306
311
|
/**
|
|
307
312
|
* Element (or element id) to append this widget element to, as a first child. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
313
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
314
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimeField#config-insertFirst)
|
|
308
315
|
*/
|
|
309
316
|
insertFirst? : HTMLElement|string
|
|
310
317
|
/**
|
|
@@ -532,7 +539,7 @@ export type BryntumTimeFieldProps = {
|
|
|
532
539
|
rtl? : boolean
|
|
533
540
|
/**
|
|
534
541
|
* Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
|
|
535
|
-
* Valid values:
|
|
542
|
+
* Valid values: `null`: do nothing, `hide`: hide the widget or `realign`: realign to the target if possible.
|
|
536
543
|
*/
|
|
537
544
|
scrollAction? : 'hide'|'realign'|null
|
|
538
545
|
/**
|
|
@@ -826,7 +833,6 @@ export class BryntumTimeField extends React.Component<BryntumTimeFieldProps> {
|
|
|
826
833
|
'autoExpand',
|
|
827
834
|
'autoSelect',
|
|
828
835
|
'bubbleEvents',
|
|
829
|
-
'centered',
|
|
830
836
|
'checkValidity',
|
|
831
837
|
'clearable',
|
|
832
838
|
'color',
|
|
@@ -899,6 +905,7 @@ export class BryntumTimeField extends React.Component<BryntumTimeFieldProps> {
|
|
|
899
905
|
'badge',
|
|
900
906
|
'callOnFunctions',
|
|
901
907
|
'catchEventHandlerExceptions',
|
|
908
|
+
'centered',
|
|
902
909
|
'cls',
|
|
903
910
|
'column',
|
|
904
911
|
'dataset',
|
|
@@ -34,6 +34,8 @@ export type BryntumTimePickerProps = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
|
|
36
36
|
* runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/core/docs/api/Core/widget/Widget#property-element).
|
|
37
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
38
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimePicker#config-appendTo)
|
|
37
39
|
*/
|
|
38
40
|
appendTo? : HTMLElement|string
|
|
39
41
|
/**
|
|
@@ -75,9 +77,10 @@ export type BryntumTimePickerProps = {
|
|
|
75
77
|
catchEventHandlerExceptions? : boolean
|
|
76
78
|
/**
|
|
77
79
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
78
|
-
*
|
|
80
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimePicker#config-centered)
|
|
81
|
+
* @property {boolean} [once] If `true`, the Widget will be centred on its first show, but if it is moved at runtime, it will opt out of centering for future shows.
|
|
79
82
|
*/
|
|
80
|
-
centered? : boolean
|
|
83
|
+
centered? : boolean|object
|
|
81
84
|
/**
|
|
82
85
|
* Custom CSS classes to add to element.
|
|
83
86
|
* May be specified as a space separated string, or as an object in which property names
|
|
@@ -163,7 +166,7 @@ export type BryntumTimePickerProps = {
|
|
|
163
166
|
dock? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
|
|
164
167
|
/**
|
|
165
168
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
166
|
-
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a
|
|
169
|
+
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a `handleSelector`
|
|
167
170
|
* property which controls when a drag should start.
|
|
168
171
|
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimePicker#config-draggable)
|
|
169
172
|
* @property {string} handleSelector CSS selector used to determine if drag can be started from a mouse-downed element inside the widget
|
|
@@ -243,10 +246,14 @@ export type BryntumTimePickerProps = {
|
|
|
243
246
|
inputFieldAlign? : 'start'|'end'
|
|
244
247
|
/**
|
|
245
248
|
* Element (or element id) to insert this widget before. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
249
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
250
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimePicker#config-insertBefore)
|
|
246
251
|
*/
|
|
247
252
|
insertBefore? : HTMLElement|string
|
|
248
253
|
/**
|
|
249
254
|
* Element (or element id) to append this widget element to, as a first child. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
255
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
256
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimePicker#config-insertFirst)
|
|
250
257
|
*/
|
|
251
258
|
insertFirst? : HTMLElement|string
|
|
252
259
|
/**
|
|
@@ -272,7 +279,7 @@ export type BryntumTimePickerProps = {
|
|
|
272
279
|
*/
|
|
273
280
|
labelPosition? : 'before'|'above'|'align-before'|'auto'|null
|
|
274
281
|
/**
|
|
275
|
-
* Sets `labelWidth
|
|
282
|
+
* Sets `labelWidth` for all children of this Container, that do not define their own `labelWidth`.
|
|
276
283
|
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/TimePicker#config-labelWidth)
|
|
277
284
|
*/
|
|
278
285
|
labelWidth? : number|null
|
|
@@ -448,7 +455,7 @@ export type BryntumTimePickerProps = {
|
|
|
448
455
|
scrollable? : boolean|ScrollerConfig|Scroller
|
|
449
456
|
/**
|
|
450
457
|
* Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
|
|
451
|
-
* Valid values:
|
|
458
|
+
* Valid values: `null`: do nothing, `hide`: hide the widget or `realign`: realign to the target if possible.
|
|
452
459
|
*/
|
|
453
460
|
scrollAction? : 'hide'|'realign'|null
|
|
454
461
|
/**
|
|
@@ -687,7 +694,6 @@ export class BryntumTimePicker extends React.Component<BryntumTimePickerProps> {
|
|
|
687
694
|
'autoUpdateRecord',
|
|
688
695
|
'border',
|
|
689
696
|
'bubbleEvents',
|
|
690
|
-
'centered',
|
|
691
697
|
'color',
|
|
692
698
|
'config',
|
|
693
699
|
'constrainTo',
|
|
@@ -740,6 +746,7 @@ export class BryntumTimePicker extends React.Component<BryntumTimePickerProps> {
|
|
|
740
746
|
'appendTo',
|
|
741
747
|
'callOnFunctions',
|
|
742
748
|
'catchEventHandlerExceptions',
|
|
749
|
+
'centered',
|
|
743
750
|
'cls',
|
|
744
751
|
'column',
|
|
745
752
|
'content',
|
package/src/BryntumToolbar.tsx
CHANGED
|
@@ -34,6 +34,8 @@ export type BryntumToolbarProps = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
|
|
36
36
|
* runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/core/docs/api/Core/widget/Widget#property-element).
|
|
37
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
38
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Toolbar#config-appendTo)
|
|
37
39
|
*/
|
|
38
40
|
appendTo? : HTMLElement|string
|
|
39
41
|
/**
|
|
@@ -75,9 +77,10 @@ export type BryntumToolbarProps = {
|
|
|
75
77
|
catchEventHandlerExceptions? : boolean
|
|
76
78
|
/**
|
|
77
79
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
78
|
-
*
|
|
80
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Toolbar#config-centered)
|
|
81
|
+
* @property {boolean} [once] If `true`, the Widget will be centred on its first show, but if it is moved at runtime, it will opt out of centering for future shows.
|
|
79
82
|
*/
|
|
80
|
-
centered? : boolean
|
|
83
|
+
centered? : boolean|object
|
|
81
84
|
/**
|
|
82
85
|
* Custom CSS classes to add to element.
|
|
83
86
|
* May be specified as a space separated string, or as an object in which property names
|
|
@@ -163,7 +166,7 @@ export type BryntumToolbarProps = {
|
|
|
163
166
|
dock? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
|
|
164
167
|
/**
|
|
165
168
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
166
|
-
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a
|
|
169
|
+
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a `handleSelector`
|
|
167
170
|
* property which controls when a drag should start.
|
|
168
171
|
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Toolbar#config-draggable)
|
|
169
172
|
* @property {string} handleSelector CSS selector used to determine if drag can be started from a mouse-downed element inside the widget
|
|
@@ -242,10 +245,14 @@ export type BryntumToolbarProps = {
|
|
|
242
245
|
inputFieldAlign? : 'start'|'end'
|
|
243
246
|
/**
|
|
244
247
|
* Element (or element id) to insert this widget before. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
248
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
249
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Toolbar#config-insertBefore)
|
|
245
250
|
*/
|
|
246
251
|
insertBefore? : HTMLElement|string
|
|
247
252
|
/**
|
|
248
253
|
* Element (or element id) to append this widget element to, as a first child. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
254
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
255
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Toolbar#config-insertFirst)
|
|
249
256
|
*/
|
|
250
257
|
insertFirst? : HTMLElement|string
|
|
251
258
|
/**
|
|
@@ -271,7 +278,7 @@ export type BryntumToolbarProps = {
|
|
|
271
278
|
*/
|
|
272
279
|
labelPosition? : 'before'|'above'|'align-before'|'auto'|null
|
|
273
280
|
/**
|
|
274
|
-
* Sets `labelWidth
|
|
281
|
+
* Sets `labelWidth` for all children of this Container, that do not define their own `labelWidth`.
|
|
275
282
|
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Toolbar#config-labelWidth)
|
|
276
283
|
*/
|
|
277
284
|
labelWidth? : number|null
|
|
@@ -445,7 +452,7 @@ export type BryntumToolbarProps = {
|
|
|
445
452
|
scrollable? : boolean|ScrollerConfig|Scroller
|
|
446
453
|
/**
|
|
447
454
|
* Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
|
|
448
|
-
* Valid values:
|
|
455
|
+
* Valid values: `null`: do nothing, `hide`: hide the widget or `realign`: realign to the target if possible.
|
|
449
456
|
*/
|
|
450
457
|
scrollAction? : 'hide'|'realign'|null
|
|
451
458
|
/**
|
|
@@ -709,7 +716,6 @@ export class BryntumToolbar extends React.Component<BryntumToolbarProps> {
|
|
|
709
716
|
'autoUpdateRecord',
|
|
710
717
|
'border',
|
|
711
718
|
'bubbleEvents',
|
|
712
|
-
'centered',
|
|
713
719
|
'color',
|
|
714
720
|
'config',
|
|
715
721
|
'constrainTo',
|
|
@@ -764,6 +770,7 @@ export class BryntumToolbar extends React.Component<BryntumToolbarProps> {
|
|
|
764
770
|
'appendTo',
|
|
765
771
|
'callOnFunctions',
|
|
766
772
|
'catchEventHandlerExceptions',
|
|
773
|
+
'centered',
|
|
767
774
|
'cls',
|
|
768
775
|
'column',
|
|
769
776
|
'content',
|
package/src/BryntumWidget.tsx
CHANGED
|
@@ -34,6 +34,8 @@ export type BryntumWidgetProps = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
|
|
36
36
|
* runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/core/docs/api/Core/widget/Widget#property-element).
|
|
37
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
38
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-appendTo)
|
|
37
39
|
*/
|
|
38
40
|
appendTo? : HTMLElement|string
|
|
39
41
|
/**
|
|
@@ -67,9 +69,10 @@ export type BryntumWidgetProps = {
|
|
|
67
69
|
catchEventHandlerExceptions? : boolean
|
|
68
70
|
/**
|
|
69
71
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
70
|
-
*
|
|
72
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-centered)
|
|
73
|
+
* @property {boolean} [once] If `true`, the Widget will be centred on its first show, but if it is moved at runtime, it will opt out of centering for future shows.
|
|
71
74
|
*/
|
|
72
|
-
centered? : boolean
|
|
75
|
+
centered? : boolean|object
|
|
73
76
|
/**
|
|
74
77
|
* Custom CSS classes to add to element.
|
|
75
78
|
* May be specified as a space separated string, or as an object in which property names
|
|
@@ -143,7 +146,7 @@ export type BryntumWidgetProps = {
|
|
|
143
146
|
dock? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
|
|
144
147
|
/**
|
|
145
148
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
146
|
-
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a
|
|
149
|
+
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a `handleSelector`
|
|
147
150
|
* property which controls when a drag should start.
|
|
148
151
|
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-draggable)
|
|
149
152
|
* @property {string} handleSelector CSS selector used to determine if drag can be started from a mouse-downed element inside the widget
|
|
@@ -205,10 +208,14 @@ export type BryntumWidgetProps = {
|
|
|
205
208
|
ignoreParentReadOnly? : boolean
|
|
206
209
|
/**
|
|
207
210
|
* Element (or element id) to insert this widget before. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
211
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
212
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-insertBefore)
|
|
208
213
|
*/
|
|
209
214
|
insertBefore? : HTMLElement|string
|
|
210
215
|
/**
|
|
211
216
|
* Element (or element id) to append this widget element to, as a first child. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
217
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
218
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/Widget#config-insertFirst)
|
|
212
219
|
*/
|
|
213
220
|
insertFirst? : HTMLElement|string
|
|
214
221
|
/**
|
|
@@ -346,7 +353,7 @@ export type BryntumWidgetProps = {
|
|
|
346
353
|
scrollable? : boolean|ScrollerConfig|Scroller
|
|
347
354
|
/**
|
|
348
355
|
* Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
|
|
349
|
-
* Valid values:
|
|
356
|
+
* Valid values: `null`: do nothing, `hide`: hide the widget or `realign`: realign to the target if possible.
|
|
350
357
|
*/
|
|
351
358
|
scrollAction? : 'hide'|'realign'|null
|
|
352
359
|
/**
|
|
@@ -540,7 +547,6 @@ export class BryntumWidget extends React.Component<BryntumWidgetProps> {
|
|
|
540
547
|
'ariaDescription',
|
|
541
548
|
'ariaLabel',
|
|
542
549
|
'bubbleEvents',
|
|
543
|
-
'centered',
|
|
544
550
|
'color',
|
|
545
551
|
'config',
|
|
546
552
|
'constrainTo',
|
|
@@ -585,6 +591,7 @@ export class BryntumWidget extends React.Component<BryntumWidgetProps> {
|
|
|
585
591
|
'appendTo',
|
|
586
592
|
'callOnFunctions',
|
|
587
593
|
'catchEventHandlerExceptions',
|
|
594
|
+
'centered',
|
|
588
595
|
'cls',
|
|
589
596
|
'column',
|
|
590
597
|
'content',
|
|
@@ -34,6 +34,8 @@ export type BryntumYearPickerProps = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Element (or the id of an element) to append this widget's element to. Can be configured, or set once at
|
|
36
36
|
* runtime. To access the element of a rendered widget, see [element](https://bryntum.com/products/core/docs/api/Core/widget/Widget#property-element).
|
|
37
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
38
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/YearPicker#config-appendTo)
|
|
37
39
|
*/
|
|
38
40
|
appendTo? : HTMLElement|string
|
|
39
41
|
/**
|
|
@@ -86,9 +88,10 @@ export type BryntumYearPickerProps = {
|
|
|
86
88
|
catchEventHandlerExceptions? : boolean
|
|
87
89
|
/**
|
|
88
90
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
89
|
-
*
|
|
91
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/YearPicker#config-centered)
|
|
92
|
+
* @property {boolean} [once] If `true`, the Widget will be centred on its first show, but if it is moved at runtime, it will opt out of centering for future shows.
|
|
90
93
|
*/
|
|
91
|
-
centered? : boolean
|
|
94
|
+
centered? : boolean|object
|
|
92
95
|
/**
|
|
93
96
|
* Custom CSS classes to add to element.
|
|
94
97
|
* May be specified as a space separated string, or as an object in which property names
|
|
@@ -184,7 +187,7 @@ export type BryntumYearPickerProps = {
|
|
|
184
187
|
dock? : 'top'|'bottom'|'left'|'right'|'start'|'end'|'header'|'pre-header'|object
|
|
185
188
|
/**
|
|
186
189
|
* *Only valid if this Widget is [floating](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-floating).*
|
|
187
|
-
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a
|
|
190
|
+
* Set to `true` to be able to drag a widget freely on the page. Or set to an object with a `handleSelector`
|
|
188
191
|
* property which controls when a drag should start.
|
|
189
192
|
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/YearPicker#config-draggable)
|
|
190
193
|
* @property {string} handleSelector CSS selector used to determine if drag can be started from a mouse-downed element inside the widget
|
|
@@ -291,10 +294,14 @@ export type BryntumYearPickerProps = {
|
|
|
291
294
|
inputFieldAlign? : 'start'|'end'
|
|
292
295
|
/**
|
|
293
296
|
* Element (or element id) to insert this widget before. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
297
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
298
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/YearPicker#config-insertBefore)
|
|
294
299
|
*/
|
|
295
300
|
insertBefore? : HTMLElement|string
|
|
296
301
|
/**
|
|
297
302
|
* Element (or element id) to append this widget element to, as a first child. If provided, [appendTo](https://bryntum.com/products/core/docs/api/Core/widget/Widget#config-appendTo) config is ignored.
|
|
303
|
+
* <div class="note">When creating nested trees of widgets, this should only be used on the outermost widget.
|
|
304
|
+
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/YearPicker#config-insertFirst)
|
|
298
305
|
*/
|
|
299
306
|
insertFirst? : HTMLElement|string
|
|
300
307
|
/**
|
|
@@ -320,7 +327,7 @@ export type BryntumYearPickerProps = {
|
|
|
320
327
|
*/
|
|
321
328
|
labelPosition? : 'before'|'above'|'align-before'|'auto'|null
|
|
322
329
|
/**
|
|
323
|
-
* Sets `labelWidth
|
|
330
|
+
* Sets `labelWidth` for all children of this Container, that do not define their own `labelWidth`.
|
|
324
331
|
* [More...](https://bryntum.com/products/grid/docs/api/Core/widget/YearPicker#config-labelWidth)
|
|
325
332
|
*/
|
|
326
333
|
labelWidth? : number|null
|
|
@@ -494,7 +501,7 @@ export type BryntumYearPickerProps = {
|
|
|
494
501
|
scrollable? : boolean|ScrollerConfig|Scroller
|
|
495
502
|
/**
|
|
496
503
|
* Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to `true`).
|
|
497
|
-
* Valid values:
|
|
504
|
+
* Valid values: `null`: do nothing, `hide`: hide the widget or `realign`: realign to the target if possible.
|
|
498
505
|
*/
|
|
499
506
|
scrollAction? : 'hide'|'realign'|null
|
|
500
507
|
/**
|
|
@@ -827,7 +834,6 @@ export class BryntumYearPicker extends React.Component<BryntumYearPickerProps> {
|
|
|
827
834
|
'bodyCls',
|
|
828
835
|
'border',
|
|
829
836
|
'bubbleEvents',
|
|
830
|
-
'centered',
|
|
831
837
|
'collapsible',
|
|
832
838
|
'color',
|
|
833
839
|
'config',
|
|
@@ -894,6 +900,7 @@ export class BryntumYearPicker extends React.Component<BryntumYearPickerProps> {
|
|
|
894
900
|
'appendTo',
|
|
895
901
|
'callOnFunctions',
|
|
896
902
|
'catchEventHandlerExceptions',
|
|
903
|
+
'centered',
|
|
897
904
|
'cls',
|
|
898
905
|
'collapsed',
|
|
899
906
|
'column',
|
package/src/WrapperHelper.tsx
CHANGED
|
@@ -50,6 +50,7 @@ type ReactComponentState = {
|
|
|
50
50
|
type HTMLElementWithData = HTMLElement & {
|
|
51
51
|
elementData?: any
|
|
52
52
|
lastPortalId?: string | null
|
|
53
|
+
jsxContainer?: HTMLElement | null
|
|
53
54
|
didSetTextContent?: boolean
|
|
54
55
|
};
|
|
55
56
|
|
|
@@ -515,9 +516,11 @@ function processCellContent(this: { reactComponent: any; isExporting: boolean; $
|
|
|
515
516
|
else {
|
|
516
517
|
// Create new portal container
|
|
517
518
|
const portalContainer = DomHelper.append(renderElement, {
|
|
518
|
-
tag
|
|
519
|
-
className
|
|
520
|
-
dataset
|
|
519
|
+
tag : 'div',
|
|
520
|
+
className : portalContainerClass,
|
|
521
|
+
dataset : { portalId }, // for reference in tests
|
|
522
|
+
// We don't want portal container to be reused in the DomConfig flip for this cell
|
|
523
|
+
retainElement : true
|
|
521
524
|
});
|
|
522
525
|
renderElement.portalContainer = portalContainer;
|
|
523
526
|
|
|
@@ -542,9 +545,27 @@ function processCellContent(this: { reactComponent: any; isExporting: boolean; $
|
|
|
542
545
|
cellElementData.hasPortal = true;
|
|
543
546
|
portal.generation = record.generation;
|
|
544
547
|
}
|
|
545
|
-
else if (
|
|
546
|
-
|
|
547
|
-
|
|
548
|
+
else if (cellElementData.hasPortal) {
|
|
549
|
+
// The previous JSX cell content can be replaced by DomConfig object so in that case,
|
|
550
|
+
// we want to delete the previously created portal for JSX. See:
|
|
551
|
+
// https://github.com/bryntum/support/issues/7862
|
|
552
|
+
const
|
|
553
|
+
container = renderElement.portalContainer || renderElement.querySelector(`.${portalContainerClass}`),
|
|
554
|
+
ownedPortalId = container?.dataset.portalId,
|
|
555
|
+
portal = ownedPortalId && state.portals.get(ownedPortalId);
|
|
556
|
+
|
|
557
|
+
if (portal && portal.containerInfo === container) {
|
|
558
|
+
deletePortal(component, ownedPortalId);
|
|
559
|
+
flushSync(() => updateGeneration(component, true));
|
|
560
|
+
}
|
|
561
|
+
else {
|
|
562
|
+
// No live portal owns this container. Since retainElement is true,
|
|
563
|
+
// we have to remove it manually
|
|
564
|
+
container?.remove();
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
renderElement.portalContainer = null;
|
|
568
|
+
cellElementData.hasPortal = false;
|
|
548
569
|
}
|
|
549
570
|
}
|
|
550
571
|
|
|
@@ -1173,7 +1194,7 @@ function processEventContent(this: any, {
|
|
|
1173
1194
|
*/
|
|
1174
1195
|
function processResourceHeader(
|
|
1175
1196
|
{ jsx, targetElement }:
|
|
1176
|
-
{ jsx: ReactElement; targetElement:
|
|
1197
|
+
{ jsx: ReactElement; targetElement: HTMLElementWithData }): void {
|
|
1177
1198
|
|
|
1178
1199
|
if (!jsx) {
|
|
1179
1200
|
return;
|
|
@@ -1186,19 +1207,36 @@ function processResourceHeader(
|
|
|
1186
1207
|
{ portals } = state,
|
|
1187
1208
|
portalId = `resource-header-${targetElement.dataset.resourceId}`;
|
|
1188
1209
|
|
|
1189
|
-
//
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1210
|
+
// Render the JSX into a retained container instead of straight into the header cell. DomSync owns the
|
|
1211
|
+
// header cell and, on every re-sync (e.g. when resizing the resource columns), it releases any DOM children
|
|
1212
|
+
// it did not create itself - adding the `b-released` class which hides the React-rendered content. A
|
|
1213
|
+
// `b-jsx-container` flagged with `retainElement` is left untouched by DomSync. The container is given
|
|
1214
|
+
// `display: contents` so it stays transparent to the header cell's flex layout.
|
|
1215
|
+
// The container is cached on the cell rather than queried from the DOM each pass.
|
|
1216
|
+
let jsxContainer = targetElement.jsxContainer;
|
|
1217
|
+
|
|
1218
|
+
if (!jsxContainer) {
|
|
1219
|
+
// Clear any plain content DomSync may have placed in the cell before hosting the portal
|
|
1220
|
+
targetElement.textContent = '';
|
|
1221
|
+
targetElement.jsxContainer = jsxContainer = DomHelper.createElement({
|
|
1222
|
+
className : 'b-jsx-container',
|
|
1223
|
+
parent : targetElement,
|
|
1224
|
+
retainElement : true,
|
|
1225
|
+
style : { display : 'contents' }
|
|
1226
|
+
}) as HTMLElement;
|
|
1227
|
+
}
|
|
1228
|
+
// When a header cell is reused for a different resource, drop the now stale portal
|
|
1229
|
+
else if (targetElement.lastPortalId && targetElement.lastPortalId !== portalId) {
|
|
1230
|
+
portals.delete(targetElement.lastPortalId);
|
|
1195
1231
|
}
|
|
1196
1232
|
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1233
|
+
// (Re)create the portal so resource record changes are reflected. Setting the same
|
|
1234
|
+
// id replaces any existing portal, so no explicit delete is needed beforehand.
|
|
1235
|
+
portals.set(portalId, ReactDOM.createPortal(jsx, jsxContainer));
|
|
1236
|
+
targetElement.lastPortalId = portalId;
|
|
1201
1237
|
|
|
1238
|
+
// Force React to re-render the portals in this tick
|
|
1239
|
+
updateGeneration(reactComponent, true);
|
|
1202
1240
|
}
|
|
1203
1241
|
|
|
1204
1242
|
/**
|