diff options
| author | Henry Jameson <me@hjkos.com> | 2022-08-23 00:35:25 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2022-08-23 00:35:25 +0300 |
| commit | 7b6745bb846ab3816937d6a8ea14c0031e0a5292 (patch) | |
| tree | 69c9e33acbf59cadc66a3e48c414677dea6130e5 /src/components/react_button/react_button.js | |
| parent | 711a610727cf57677923816b08ef445372724995 (diff) | |
| parent | 8e97a40c700797819bf92c61398daff230404228 (diff) | |
Merge remote-tracking branch 'origin/develop' into navigation-update
* origin/develop: (49 commits)
Fix react & extra buttons not styled on tab-focus
Fix popover not popping up
Fix styling on Safari
Use :focus-visible instead of :focus for focus markers
Optimize Reply badge position
Add badges to status interacting buttons
Update dependency nightwatch to v2
Update dependency eslint-plugin-n to v15.2.5
Update dependency mocha to v10
Update dependency karma-coverage to v2
Update dependency sass to v1.54.5
Update dependency karma-firefox-launcher to v2
Update dependency vue-template-compiler to v2.7.9
Pin dependencies
Refresh yarn.lock
Allow column width configuration: allow stretching navbar with columns
Remove legacy code for chunksSortMode
Add FIXME comment about html-webpack-plugin-after-emit
Use exact webpack version in package.json
Reintroduce css minimizer
...
Diffstat (limited to 'src/components/react_button/react_button.js')
| -rw-r--r-- | src/components/react_button/react_button.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js index 37d6e7d0..5e052e1e 100644 --- a/src/components/react_button/react_button.js +++ b/src/components/react_button/react_button.js @@ -1,15 +1,21 @@ import Popover from '../popover/popover.vue' import { library } from '@fortawesome/fontawesome-svg-core' +import { faPlus, faTimes } from '@fortawesome/free-solid-svg-icons' import { faSmileBeam } from '@fortawesome/free-regular-svg-icons' import { trim } from 'lodash' -library.add(faSmileBeam) +library.add( + faPlus, + faTimes, + faSmileBeam +) const ReactButton = { props: ['status'], data () { return { - filterWord: '' + filterWord: '', + expanded: false } }, components: { @@ -25,6 +31,13 @@ const ReactButton = { } close() }, + onShow () { + this.expanded = true + this.focusInput() + }, + onClose () { + this.expanded = false + }, focusInput () { this.$nextTick(() => { const input = this.$el.querySelector('input') |
