DevExpress / DevExpress/DevExtreme.AspNet.Data
JavaScript: support optional byKeyUrl
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 165
- Forks
- 140
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 4
Description
Aleksey
Further to my PR and previous issue https://github.com/DevExpress/DevExtreme.AspNet.Data/pull/150...
Having a separate byKeyUrl would be useful. The case you gave as achieving this result actually does not work in the case which necessitated me implementing this function.
The most common case I have for this is to do with users. I have several methods that return a subset of the user base. For example OrderApprovalUsers which is a subset of Users returned by users/GetOrderApprovalUsers.
When an Order is raised, the current list of approved users is returned for the selectbox, a user is selected e.g. user id 99. Lets say later that user leaves the business, or their authority is revoked - they are no longer returned by the users/GetOrderApprovalUsers controller method. As a result, no call to users/GetOrderApprovalUsers with userid:99 will ever return a value.
This means whenever I display this record, the ApprovedBy field is blank - even though I have data to complete it.
If however a separate byKeyUrl such as I have implemented can be specified, then the selectbox can call users/GetUserById?UserId=99 without impacting any other functionality. By default, the ByKey method uses the LoadUrl anyway, so all that is required is an additional property ByKeyUrl that is only actually used if it is specified. It is a very small change with a very powerful additional functionality.
Would you please reconsider?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing ByKey method and LoadUrl handling referenced in the issue, then review the earlier pull request linked in the description for context. Determine where an optional ByKeyUrl would be read and used without changing the default behavior, and verify the separate URL works while the existing LoadUrl path remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, javascript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100