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

Unable to add custom fields in AccountDetailsScreen component #644

Open
nikhildeshmukh-eaton opened this issue Sep 16, 2024 · 2 comments
Open
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering enhancement Request for improvement or new feature user-reported This was reported by a user outside the maintainers team.

Comments

@nikhildeshmukh-eaton
Copy link

We have updated to latest update of BLUI library.

Now when i am injecting children components to as below:

(para.length > 0 ? true : false)} />

Here we don't see any option to add additional fields apart from mandatory fields(name, lastName).

With the earlier version, we use to have below mechanism to pass our customComponents for Account Details screen as below:
customAccountDetails={[
{ component: CustomDetailsScreen },
{
component: CustomDetailsScreenTwo,
title: 'Job Info',
instructions: 'Enter your employment information below.',
},
]}

as a prop to AuthUIContextProvider component.

Team, will it be possible to add option to add custom fields as per product requirement?

@nikhildeshmukh-eaton nikhildeshmukh-eaton added brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering bug Something not working as expected needs-review Issues that we would like to revisit/review labels Sep 16, 2024
@surajeaton surajeaton added the user-reported This was reported by a user outside the maintainers team. label Sep 16, 2024
@joebochill joebochill added enhancement Request for improvement or new feature and removed bug Something not working as expected labels Sep 16, 2024
@surajeaton
Copy link
Collaborator

After the discussion with the team, to handle dynamic data coming from the custom details prop will not be feasible solution as that may vary according to each application.
The best solution is to develop a custom screen and manage data.

@surajeaton surajeaton removed the needs-review Issues that we would like to revisit/review label Sep 25, 2024
@komal-eaton
Copy link
Contributor

We are exploring the following approach and we will decide whether to support this approach before making it final.

So, we are planning to allow users to add customAccountDetails thought the AccountDetailsScreen.

user will need to define custom components and pass them as prop customAccountDetails (an array of objects each containing a custom component) to AccountDetailsScreen.

To handle data changes each custom component should accept onDetailsChanged and initialDetails props.

  • onDetailsChanged : will be a function prop that the custom component will call whenever its data changes.
  • initialDetails : will provides the initial data for the custom component and ensures that the custom component is initialised with the current state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering enhancement Request for improvement or new feature user-reported This was reported by a user outside the maintainers team.
Development

No branches or pull requests

4 participants