Only render preview if picker has a preview function (#8667)

pull/8668/head
Ryan Mehri 1 year ago committed by GitHub
parent 7d7ed78681
commit d0430f1c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -795,7 +795,8 @@ impl<T: Item + 'static + Send + Sync> Component for Picker<T> {
// | | | |
// +---------+ +---------+
let render_preview = self.show_preview && area.width > MIN_AREA_WIDTH_FOR_PREVIEW;
let render_preview =
self.show_preview && self.file_fn.is_some() && area.width > MIN_AREA_WIDTH_FOR_PREVIEW;
let picker_width = if render_preview {
area.width / 2

Loading…
Cancel
Save