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

Feat: Dynamic Enums (Advanced) #67

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

srijitcoder
Copy link
Member

@srijitcoder srijitcoder commented Dec 24, 2024

GIF.from.Imgur.mp4

Implemented changes -

  • Add dynamic customEditorInterface using globalThis.customEditorInterfaces
globalThis.customEditorInterfaces = {
  "osc:project": {
    type: "string",
    format: "osc-project",
    func: OSCEditor,
    path: "projects",
    file: (pathname) => `projects/${pathname}/collection.json`,
    operation: Operation,
  }
]

Here OSCEditor is the custom editor class
Example of how to build a custom editor interface can be found here: https://github.com/json-editor/json-editor/blob/master/docs/custom-editor.html

Operation contains events need to be performed on a particular field when select and unselect event happens

@srijitcoder srijitcoder linked an issue Dec 30, 2024 that may be closed by this pull request
@srijitcoder srijitcoder added enhancement New feature or request feature labels Jan 7, 2025
@srijitcoder srijitcoder marked this pull request as ready for review January 7, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Dynamic" enums from within the branch
1 participant