sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Nitpicking: conditionally render search button or set a default

Open Languafe opened this issue 7 years ago • 4 comments

I spent a couple minutes wondering why the search wasn't working before I realised there is no initial value for the property clientMode. By replacing the JSX for the search button

<PrimaryButton text='Search' title='Search' onClick={this._search} />

with

{ this.props.clientMode ? <PrimaryButton text='Search' title='Search' onClick={this._search} /> : <p>Configure client mode by editing web part</p> }

this will be immediately obvious.

I enjoyed the tutorial, but if I could point out something else it would be the order of file edits and interface declarations / imports which provokes errors in VS Code (which I assume most SPFX developers are using) before I've even attempted building, as they occur when I follow the tutorial from start to finish and manually copying or typing the code as instructed.

For instance, it would make sense to first create the IUserItem.ts file, and then afterwards instruct us to add the code where it is used, perhaps even showcasing auto-import in vs code.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Languafe avatar Feb 05 '19 14:02 Languafe

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

msft-github-bot avatar Feb 05 '19 14:02 msft-github-bot

We accept PR's ;)...

Care to submit an edit to the page fixing the issue you ID in your comment? Sharing is caring :)

andrewconnell avatar Feb 06 '19 21:02 andrewconnell

First time contributor. I think I forked the repo and submitted a pull request to my own fork first, or something? I believe I now have submitted a pull request to the actual sp-dev-docs repo.

Languafe avatar Feb 07 '19 08:02 Languafe

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 25 '20 06:01 msft-github-bot