Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed react import to fix "cannot be used as a JSX component" error #1500

Merged
merged 2 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/controls/fieldPicker/FieldPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import cloneDeep from 'lodash/cloneDeep';
import { Dropdown, IDropdownOption, IDropdownProps } from 'office-ui-fabric-react/lib/Dropdown';
import { Spinner, SpinnerSize } from 'office-ui-fabric-react/lib/Spinner';
Expand Down
14 changes: 13 additions & 1 deletion src/webparts/controlsTest/components/ControlsTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ import { ModernAudio, ModernAudioLabelPosition } from "../../../ModernAudio";
import { SPTaxonomyService, TaxonomyTree } from "../../../ModernTaxonomyPicker";
import { TestControl } from "./TestControl";
import { UploadFiles } from "../../../controls/uploadFiles";
import { FieldPicker } from "../../../FieldPicker";

// Used to render document card
/**
Expand Down Expand Up @@ -1515,6 +1516,18 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
onSelectedItem={this.listItemPickerDataSelected} />

</div>

<div className="ms-font-m">Field picker tester:
<FieldPicker
context={this.props.context}
label={'Select a field'}
listId={this.state.selectedList}
onSelectionChanged={(fields) => {
console.log(fields);
}}
/>
</div>

<div>Icon Picker</div>
<div>
<IconPicker
Expand Down Expand Up @@ -2428,7 +2441,6 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
</Stack>
</EnhancedThemeProvider>
</div>

</div>
);
}
Expand Down