Skip to content

Commit f0c35c3

Browse files
committed
React no deprecated + TreeView.tsx
1 parent e53f9a4 commit f0c35c3

File tree

26 files changed

+38
-38
lines changed

26 files changed

+38
-38
lines changed

src/controls/chartControl/ChartControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class ChartControl extends React.Component<IChartControlProps, IChartCont
7979
*
8080
* @param nextProps
8181
*/
82-
public componentWillReceiveProps(nextProps: IChartControlProps): void {
82+
public UNSAFE_componentWillReceiveProps(nextProps: IChartControlProps): void {
8383
if (nextProps.datapromise !== this.props.datapromise) {
8484
this.setState({
8585
isLoading: false

src/controls/dateTimePicker/DateTimePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class DateTimePicker extends React.Component<IDateTimePickerProps, IDateT
6969
/**
7070
* Called before the component receives new props, used for matching state with new props.
7171
*/
72-
public componentWillReceiveProps(nextProps: IDateTimePickerProps): void {
72+
public UNSAFE_componentWillReceiveProps(nextProps: IDateTimePickerProps): void {
7373
if (!isEqual(nextProps.value, this.props.value)) {
7474
const { day, hours, minutes, seconds } = DateTimePicker.getDateComponents(nextProps.value, this.props.dateConvention);
7575
this.setState({ day, hours, minutes, seconds });

src/controls/fieldCollectionData/collectionNumberField/CollectionNumberField.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class CollectionNumberField extends React.Component<ICollectionNumberFiel
2424
/**
2525
* componentWillMount lifecycle hook
2626
*/
27-
public componentWillMount(): void {
27+
public UNSAFE_componentWillMount(): void {
2828
this.setState({
2929
value: this.props.item[this.props.field.id]
3030
});
@@ -37,7 +37,7 @@ export class CollectionNumberField extends React.Component<ICollectionNumberFiel
3737
* @param nextProps
3838
* @param nextState
3939
*/
40-
public componentWillUpdate(nextProps: ICollectionNumberFieldProps, nextState: ICollectionNumberFieldState): void {
40+
public UNSAFE_componentWillUpdate(nextProps: ICollectionNumberFieldProps, nextState: ICollectionNumberFieldState): void {
4141
if (!isEqual(nextProps.item, this.props.item)) {
4242
this.setState({
4343
value: nextProps.item[nextProps.field.id]

src/controls/fields/fieldUserRenderer/FieldUserRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class FieldUserRenderer extends React.Component<IFieldUserRendererProps,
115115
};
116116
}
117117

118-
public componentWillReceiveProps(nextProps: IFieldUserRendererProps) {
118+
public UNSAFE_componentWillReceiveProps(nextProps: IFieldUserRendererProps) {
119119
const currentPrincipals = this.props.users ? this.props.users.map(u => u.id) : [];
120120
const newPrincipals = nextProps.users ? nextProps.users.map(u => u.id) : [];
121121

src/controls/filePicker/FilePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class FilePicker extends React.Component<
103103
*
104104
* @param nextProps
105105
*/
106-
public componentWillReceiveProps(nextProps: IFilePickerProps): void {
106+
public UNSAFE_componentWillReceiveProps(nextProps: IFilePickerProps): void {
107107
if (nextProps.isPanelOpen || nextProps.isPanelOpen !== this.props.isPanelOpen) {
108108
this.setState({
109109
panelOpen: nextProps.isPanelOpen

src/controls/folderPicker/FolderPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class FolderPicker extends React.Component<IFolderPickerProps, IFolderPic
2727
};
2828
}
2929

30-
public componentWillReceiveProps(nextProps: IFolderPickerProps) {
30+
public UNSAFE_componentWillReceiveProps(nextProps: IFolderPickerProps) {
3131

3232
this.setState({
3333
selectedFolder: nextProps.defaultFolder,

src/controls/iFrameDialog/IFrameDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class IFrameDialog extends React.Component<IFrameDialogProps, IFrameDialo
8383
/**
8484
* componentWillMount lifecycle hook
8585
*/
86-
public componentWillMount(): void {
86+
public UNSAFE_componentWillMount(): void {
8787
this.setState({
8888
dialogId: `dialog-${Guid.newGuid().toString()}`
8989
});
@@ -96,7 +96,7 @@ export class IFrameDialog extends React.Component<IFrameDialogProps, IFrameDialo
9696
this.setDialogStyling();
9797
}
9898

99-
public componentWillReceiveProps(nextProps: IFrameDialogProps) {
99+
public UNSAFE_componentWillReceiveProps(nextProps: IFrameDialogProps) {
100100
if (nextProps.hidden && nextProps.hidden !== this.props.hidden) {
101101
this.setState({
102102
isStylingSet: false

src/controls/listItemPicker/ComboBoxListItemPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class ComboBoxListItemPicker extends React.Component<IComboBoxListItemPic
8080
}
8181
}
8282

83-
public async componentWillReceiveProps(nextProps: IComboBoxListItemPickerProps): Promise<void> {
83+
public async UNSAFE_componentWillReceiveProps(nextProps: IComboBoxListItemPickerProps): Promise<void> {
8484
if (nextProps.listId !== this.props.listId) {
8585
this.setState({
8686
selectedItems: [],

src/controls/listItemPicker/ListItemPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class ListItemPicker extends React.Component<IListItemPickerProps, IListI
3737
this.loadField(this.props);
3838
}
3939

40-
public componentWillReceiveProps(nextProps: IListItemPickerProps) {
40+
public UNSAFE_componentWillReceiveProps(nextProps: IListItemPickerProps) {
4141
let newSelectedItems: any[] | undefined;
4242
if (this.props.listId !== nextProps.listId) {
4343
newSelectedItems = [];

src/controls/listView/ListView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export class ListView extends React.Component<IListViewProps, IListViewState> {
9696
* @param prevProps
9797
* @param prevState
9898
*/
99-
public componentWillReceiveProps(nextProps: IListViewProps): void {
99+
public UNSAFE_componentWillReceiveProps(nextProps: IListViewProps): void {
100100

101101
const modifiedNextProps = this._filterFunctions(nextProps);
102102
const modifiedProps = this._filterFunctions(this.props);

0 commit comments

Comments
 (0)