Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new number input field defaults to 0 unlike the text field. Cannot set empty default value either. #470

Closed
4 of 8 tasks
dmantisk opened this issue Nov 28, 2024 · 7 comments
Labels
bug Undesired behavior caused by this plugin

Comments

@dmantisk
Copy link

Please fill out these Check-boxes

  • I checked for existing similar issues
  • I checked that the plugin is up to date
  • The issue persists with all other plugins and themes disabled

Plugin Version

1.2.5

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Debug Info

SYSTEM INFO:
	Obsidian version: v1.7.7
	Installer version: v1.7.7
	Operating system: Windows 10 Pro 10.0.19045
	Login status: not logged in
	Language: en
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: Minimal v7.7.18
	Snippets enabled: 11
	Restricted mode: off
	Plugins installed: 22
	Plugins enabled: 20
		1: Style Settings v1.0.9
		2: Minimal Theme Settings v8.1.1
		3: Note Toolbar v1.14.9
		4: Ribbon Divider v1.1.1
		5: Note Definitions v0.27.0
		6: Custom Attachment Location v4.29.1
		7: Templater v2.9.1
		8: Settings Search v1.3.10
		9: Badges v1.1.0
		10: Excalidraw v2.6.7
		11: Iconize v2.14.4
		12: Modal forms v1.52.0
		13: Sheets Extended v1.2.10
		14: Spaced Repetition v1.13.2
		15: Regex Mark v1.9.3
		16: Local Backup v0.1.8
		17: Easy Typing v5.5.9
		18: Automatic Renumbering v1.1.0
		19: Global Search and Replace v0.5.0
		20: Meta Bind v1.2.5

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Describe the Issue

The input field for number defaults to having '0'. In comparison, the text field is empty with the placeholder 'text' by default.

The problem is I cannot set the 'defaultValue' to be empty either.

Steps to Reproduce

Create either a new inline or codeblock number input field
INPUT[number]

Expected Behavior

Create an empty number input field without any default data like the text field.

@dmantisk dmantisk added the bug Undesired behavior caused by this plugin label Nov 28, 2024
@dmantisk dmantisk changed the title The number input field defaults to 0 when empty unlike the text field A new number input field defaults to 0 unlike the text field. Cannot set empty default value either. Nov 28, 2024
@dmantisk
Copy link
Author

I'm unsure if this should be a feature request instead.

@mProjectsCode
Copy link
Owner

This is not really a bug, but I agree that 0 as the default value is not optimal. You should be able to get an empty default value via defaultValue(null).

@dmantisk
Copy link
Author

Thank you, but I'm afraid that doesn't work either
image

@mProjectsCode
Copy link
Owner

fixed in 8549da2

@dmantisk
Copy link
Author

fixed in 8549da2

This doesn't seem to be fixed as of version 1.2.5.
Is the change not added to the update or?

@mProjectsCode
Copy link
Owner

1.2.5 is older than that commit.

@dmantisk
Copy link
Author

dmantisk commented Dec 24, 2024

1.2.5 is older than that commit.

image
??

To be clear, I only want to make sure that the fix is mistakenly left out or something.
I am on the latest version available through obsidian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behavior caused by this plugin
Projects
None yet
Development

No branches or pull requests

2 participants