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

Support Disable Code Fold Message #49

Closed
todd opened this issue Nov 13, 2019 · 3 comments
Closed

Support Disable Code Fold Message #49

todd opened this issue Nov 13, 2019 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@todd
Copy link

todd commented Nov 13, 2019

Hi there,

I have a use-case where I need to hide the code fold message. Passing undefined to codeFoldRenderer simply falls back to the default behavior. It's possible to pass an override function, but this feels like a bit of a hack. Would a PR be accepted to support a displayCodeFoldMessage property that would optionally allow users to disable the code fold message? The default value would be true to support backwards-compatibility.

Thanks for all the work on this component!

@todd
Copy link
Author

todd commented Nov 13, 2019

Additionally/alternatively, would a style override for the code fold be welcomed as well?

@praneshr praneshr self-assigned this Nov 14, 2019
@praneshr
Copy link
Owner

Hey @todd, did you try using codeFoldMessageRenderer and return an empty string?. I don't think displayCodeFoldMessage will be needed as there is a way to customize the same. If you don't want code folding, set showDiffOnly to false. Let me know your thoughts.

@praneshr praneshr added the question Further information is requested label Nov 14, 2019
@todd
Copy link
Author

todd commented Nov 22, 2019

I actually managed to do what I needed by using those properties - didn't seem to take immediately in my application, but it eventually sorted itself out. Sorry for the noise.

@todd todd closed this as completed Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants