Skip to content

Commit 951911c

Browse files
Add ability to force-display actions
Signed-off-by: Marco Ambrosini <marcoambrosini@icloud.com>
1 parent 6a6df51 commit 951911c

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

src/components/NcAppNavigationItem/NcAppNavigationItem.vue

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ Just set the `pinned` prop.
169169

170170
<!-- Counter and Actions -->
171171
<div v-if="hasUtils && !editingActive" class="app-navigation-entry__utils">
172-
<div v-if="$slots.counter && !displayActionsOnHoverFocus"
172+
<div v-if="$slots.counter && (!displayActionsOnHoverFocus || forceDisplayActions)"
173173
class="app-navigation-entry__counter-wrapper">
174174
<slot name="counter" />
175175
</div>
176-
<NcActions v-show="displayActionsOnHoverFocus"
176+
<NcActions v-show="displayActionsOnHoverFocus || forceDisplayActions"
177177
ref="actions"
178178
menu-align="right"
179179
:container="'#' + id"
@@ -283,6 +283,7 @@ export default {
283283
type: Boolean,
284284
default: false,
285285
},
286+
286287
/**
287288
* Passing in a route will make the root element of this
288289
* component a `<router-link />` that points to that route.
@@ -292,6 +293,7 @@ export default {
292293
type: [String, Object],
293294
default: '',
294295
},
296+
295297
/**
296298
* Pass in `true` if you want the matching behaviour to
297299
* be non-inclusive: https://router.vuejs.org/api/#exact
@@ -308,6 +310,7 @@ export default {
308310
type: Boolean,
309311
default: false,
310312
},
313+
311314
/**
312315
* Makes the title of the item editable by providing an `ActionButton`
313316
* component that toggles a form
@@ -316,20 +319,23 @@ export default {
316319
type: Boolean,
317320
default: false,
318321
},
322+
319323
/**
320324
* Only for 'editable' items, sets label for the edit action button.
321325
*/
322326
editLabel: {
323327
type: String,
324328
default: '',
325329
},
330+
326331
/**
327332
* Only for items in 'editable' mode, sets the placeholder text for the editing form.
328333
*/
329334
editPlaceholder: {
330335
type: String,
331336
default: '',
332337
},
338+
333339
/**
334340
* Pins the item to the bottom left area, above the settings. Do not
335341
* place 'non-pinned' `AppnavigationItem` components below `pinned`
@@ -339,55 +345,70 @@ export default {
339345
type: Boolean,
340346
default: false,
341347
},
348+
342349
/**
343350
* Puts the item in the 'undo' state.
344351
*/
345352
undo: {
346353
type: Boolean,
347354
default: false,
348355
},
356+
349357
/**
350358
* The navigation collapsible state (synced)
351359
*/
352360
open: {
353361
type: Boolean,
354362
default: false,
355363
},
364+
356365
/**
357366
* The actions menu open state (synced)
358367
*/
359368
menuOpen: {
360369
type: Boolean,
361370
default: false,
362371
},
372+
363373
/**
364374
* Force the actions to display in a three dot menu
365375
*/
366376
forceMenu: {
367377
type: Boolean,
368378
default: false,
369379
},
380+
370381
/**
371382
* The action's menu default icon
372383
*/
373384
menuIcon: {
374385
type: String,
375386
default: undefined,
376387
},
388+
377389
/**
378390
* The action's menu direction
379391
*/
380392
menuPlacement: {
381393
type: String,
382394
default: 'bottom',
383395
},
396+
384397
/**
385398
* Entry aria details
386399
*/
387400
ariaDescription: {
388401
type: String,
389402
default: null,
390403
},
404+
405+
/**
406+
* To be used only when the elements in the actions menu are very important
407+
*/
408+
forceDisplayActions: {
409+
type: Boolean,
410+
default: false,
411+
},
391412
},
392413
393414
emits: [

0 commit comments

Comments
 (0)