diff options
author | Dessalines <tyhou13@gmx.com> | 2020-02-15 16:09:53 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-02-15 16:09:53 -0500 |
commit | 83d17b2643f1c9d56f2338cb244d857eddaf1fb4 (patch) | |
tree | 09e44310525885296e05e55ee2ca7da81b4da00c /ui/src/components/post-form.tsx | |
parent | 845c2b70a5edba71bef4bd6be48f71a214241c17 (diff) |
Fix minor issue with selector. Fix issue with truncate wrapping.
Diffstat (limited to 'ui/src/components/post-form.tsx')
-rw-r--r-- | ui/src/components/post-form.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index 8abdf26d..d502330b 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -518,10 +518,12 @@ export class PostForm extends Component<PostFormProps, PostFormState> { // Set up select searching let selectId: any = document.getElementById('post-community'); - let selector = new Selectr(selectId, {}); - selector.on('selectr.select', option => { - this.state.postForm.community_id = Number(option.value); - }); + if (selectId) { + let selector = new Selectr(selectId, { nativeDropdown: false }); + selector.on('selectr.select', option => { + this.state.postForm.community_id = Number(option.value); + }); + } } else if (res.op == UserOperation.CreatePost) { let data = res.data as PostResponse; if (data.post.creator_id == UserService.Instance.user.id) { |