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

implement prompt #4698

Merged
merged 4 commits into from
Dec 12, 2024
Merged

Conversation

tomaskikutis
Copy link
Member

STT-63

A styled alternative to window.prompt.

Comment on lines 44 to 45
this.props.onDone(this.state.value);
this.props.closeModal();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you pass the state to closeModal and just have one function? So in the usage it would be:

closeModal={(value) => { ...processing closeModal(); <-- coming from showModal })

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since both functions are not exposed to the options interface it makes sense to me

position="top"
visible
onHide={this.props.closeModal}
headerTemplate=""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? From what I checked in UIF this is the interface for the prop headerTemplate?: JSX.Element | string;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant to select only headerTemplate as the row to comment on, my bad

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's how I understood it and only dropped headerTemplate

@tomaskikutis tomaskikutis merged commit 6b334d2 into superdesk:develop Dec 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants