Comments (9)
@ymihir did you update the targetProperty
to the property in your web part. This was incorrectly documented and updated it: https://sharepoint.github.io/sp-dev-fx-property-controls/controls/PropertyFieldListPicker/
So lists
must be the same on line 1 ('lists') and 3 (this.properties.lists):
PropertyFieldListPicker('lists', {
label: 'Select a list',
selectedList: this.properties.lists,
includeHidden: false,
orderBy: PropertyFieldListPickerOrderBy.Title,
disabled: false,
onPropertyChange: this.onPropertyPaneFieldChanged.bind(this),
properties: this.properties,
context: this.context,
onGetErrorMessage: null,
deferredValidationTime: 0,
key: 'listPickerFieldId'
})
If you copied it from the documentation, you would probably have singleList
which is not correct.
from sp-dev-fx-controls-react.
Yes I have sorted out that issue. Thanks for the documentation update.
from sp-dev-fx-controls-react.
Hi @ymihir have you already tried specifying the viewFields
property? Here is an example:
const viewFields: IViewField[] = [
{
name: 'ListItemAllFields.Id',
displayName: 'ID',
maxWidth: 40,
sorting: true
},
{
name: 'ListItemAllFields.Underscore_Field',
displayName: "Underscore_Field",
sorting: true
},
{
name: 'Name',
linkPropertyName: 'ServerRelativeUrl',
sorting: true
},
{
name: 'ServerRelativeUrl',
displayName: 'Path',
render: (item: any) => {
return <a href={item['ServerRelativeUrl']}>Link</a>;
}
},
{
name: 'Title'
}
];
from sp-dev-fx-controls-react.
@estruyf but as per the documentation viewFields is optional right! I need to pass the structure compulsory?
I am implementing this with PropertyFieldListPicker. When I select any list and if i reload the page, earlier selection is not preserving. Dropdown value coming as blank. Any idea about this issue?
from sp-dev-fx-controls-react.
Yes, it is, but in combination with the iconFieldName
it will only show the icon. If you would remove the iconFieldName
, the control itself will define the fields to show.
from sp-dev-fx-controls-react.
Yes, Perfect Once i remove the iconFieldName
it is showing as below with raw data. Any idea with second issue where dropdown value is not preserving as showing in second screenshot.
from sp-dev-fx-controls-react.
That could be a bug in the Office UI dropdown control. Which version of the SPFx are you using? If possible, can you also check the installed version of office-ui-fabric-react
?
from sp-dev-fx-controls-react.
i am having office-ui-fabric-react version as 5.6.0
from sp-dev-fx-controls-react.
Hello,
I have similar issue where I defined the ViewFields:
export const viewFields : IViewField []= [{
name: "Car",
displayName: "Car",
//linkPropertyName: "c",
isResizable: true,
sorting: true,
minWidth: 0,
maxWidth: 150,
render: (item:any) =>
},{
name: "DistanceKm",
displayName: "Distance",
isResizable: true,
sorting: true,
minWidth: 0,
maxWidth: 100
},];
But the Car field is not rendered and I get error. Each other field is rendered as it should. I tried every combinations like item.Car.Car, item['Car'].Car etc. I receive the items from Sharepoint as following:
The error that i got is:
Please help.
Thanks.
from sp-dev-fx-controls-react.
Related Issues (20)
- Dynamic Form - Saving not working HOT 1
- TypeError: Cannot read properties of undefined (reading 'select') HOT 1
- Error - Upgrading to SPFx 1.19.0 HOT 9
- ModernTaxonomyPicker - allowMultipleSelections = false, but panel allows multiple items to be selected HOT 2
- SPFX List View CommandSet not appearing on list with the new lists UI HOT 1
- Grid layout settings as parameters
- PeoplePicker Group could not be found. HOT 1
- FilePicker JSX element class does not support attributes because it does not have a 'props' property HOT 1
- Disable/Enable Dynamic form based on property does not work as expected HOT 4
- ListItemAttachments Control Mistranslation of Chinese text and anachronisms HOT 3
- PeoplePicker not compatible with SharePoint 1.19? HOT 3
- Question: Brand Centre Custom Font support HOT 1
- DynamicForm - Form should hide fields that are hidden on the list content type
- SPFX Controls in external library HOT 3
- SPFx Extension ApplicationCustomizerContext not compatible to BaseComponentContext on SiteBreadcrumb HOT 1
- @fluentui/react package dependency update HOT 2
- ListItemPicker, calculated column as columnInternalName not working HOT 1
- [TaxonomyPicker] Enhancements
- ListItemAttachments. How to rename the uploaded files?
- ListItemComments. You can't select and copy text from the comment.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sp-dev-fx-controls-react.