diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-11-26 22:11:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 22:11:09 +0100 |
commit | 3f382e337d5c40db18995a88c0bf6b1b34f031b7 (patch) | |
tree | 21092a80845f11cb52f0d98270171141a87e4065 | |
parent | 1630807ee2517e7a9dbb66cbd532a0c46e01abcf (diff) |
Fix searching for additional hashtags in hashtag column (#17054)
-rw-r--r-- | app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js b/app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js index 5914bbeaf..a4f71f8a3 100644 --- a/app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js +++ b/app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js @@ -11,21 +11,22 @@ const mapStateToProps = (state, { columnId }) => { return {}; } - return { settings: columns.get(index).get('params') }; + return { + settings: columns.get(index).get('params'), + onLoad (value) { + return api(() => state).get('/api/v2/search', { params: { q: value, type: 'hashtags' } }).then(response => { + return (response.data.hashtags || []).map((tag) => { + return { value: tag.name, label: `#${tag.name}` }; + }); + }); + }, + }; }; const mapDispatchToProps = (dispatch, { columnId }) => ({ onChange (key, value) { dispatch(changeColumnParams(columnId, key, value)); }, - - onLoad (value) { - return api().get('/api/v2/search', { params: { q: value, type: 'hashtags' } }).then(response => { - return (response.data.hashtags || []).map((tag) => { - return { value: tag.name, label: `#${tag.name}` }; - }); - }); - }, }); export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings); |