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

sitePicker does not display initialsites until you click the dropdown to select #895

Closed
russgove opened this issue May 8, 2021 · 2 comments
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Milestone

Comments

@russgove
Copy link
Contributor

russgove commented May 8, 2021

Category

[ ] Enhancement

[x ] Bug

[ ] Question

Version

Please specify what version of the library you are using: [ latest ]

Expected / Desired Behavior / Question

When you set the initialsites option the title of the in ititialsite should appear as the selected site on the initial display.

Observed Behavior

the picker appears blank until you hit the dropdown, then the site you selected as the initiualsites displays.

Steps to Reproduce

        <SitePicker
            initialSites={[{ id: item.siteId, url: decodeURIComponent(item.siteUrl), title: "sd" }]}
            context={parentContext.webPartContext}
            label={'Select site to capture'}
            mode={'site'}
            allowSearch={false}
            multiSelect={false}
            onChange={(sites) => {
                setItem((temp) => ({ ...temp, siteUrl: sites[0].url, captureToSiteId: sites[0].id, siteId: sites[0].id }));
                console.log(sites);
            }}
            placeholder={'Select sites'}
            searchPlaceholder={'Filter sites'} />
@ghost
Copy link

ghost commented May 8, 2021

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label May 8, 2021
AJIXuMuK added a commit that referenced this issue May 15, 2021
@AJIXuMuK
Copy link
Collaborator

Thanks @russgove for reporting this! Good catch!
The fix has been implemented and will be included in the next release.

@AJIXuMuK AJIXuMuK added status:fixed-next-drop Issue will be fixed in upcoming release. type:bug and removed Needs: Triage 🔍 labels May 15, 2021
@AJIXuMuK AJIXuMuK added this to the 3.2.0 milestone May 15, 2021
AJIXuMuK added a commit that referenced this issue May 15, 2021
This was referenced Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Projects
None yet
Development

No branches or pull requests

2 participants