nextcloud-libraries / nextcloud-libraries/nextcloud-vue

`NcActionInput` comment in placeholder does not work

Open
#3,865 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop bug feature: actions
Dominant language
Vue
Stars
246
Forks
99
Avg merge
1d 20h
Merged PRs (30d)
103

Description

I noticed that it does not work to add a comment in the default slot (for the placeholder).

Meaning this will not show any placeholder ❌ :

<NcActionInput :value="regex">
	<template #icon>
		<IconRegex :size="20" />
	</template>
	<!-- This a example regex for the placeholder -->
	/^[a-z]{3}$/i
</NcActionInput>

But it works if I switch the order ✔️ :

<NcActionInput :value="regex">
	<template #icon>
		<IconRegex :size="20" />
	</template>
	/^[a-z]{3}$/i
	<!-- ^ This a example regex for the placeholder -->
</NcActionInput>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the NcActionInput component and reproduce the two default-slot examples to inspect how slot content becomes the placeholder. Check the component's existing tests, if present, and confirm that comments around the default-slot content no longer prevent the placeholder from appearing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.